Non-Kosher foods – Refraining a Child from Eating Forbidden Foods: Although one is not obligated to forcibly prevent a child from eating forbidden foods, one should nevertheless refrain the child from doing so whenever possible, irrelevant of the child’s age. This is because forbidden foods are understood to have a negative effect on a child’s nature, even when the child is a mere infant.[1] Accordingly, not only should the father endeavor to prevent the child from eating forbidden foods, but even other bystanders should do so when possible, despite not being obligated to do so according to the strict letter of the law.[2] [Even when a child requires food for medical reasons, every possible effort must be made to provide a kosher alternative. This is because consuming non-kosher food can nevertheless have a negative impact on the child’s character. This principle is evident from the ruling that even a pregnant[3] or nursing[4] mother who must eat non-kosher food for medical reasons should avoid doing so whenever possible, and if she does partake of non-kosher food, she should refrain from nursing the child.[5]]
[1] Rama Yoreh Deah 81:7 regarding an infant eating milk from a gentile, as explained in Shach 81:26; M”A 343:2; Tosefes Shabbos 343:2; Kaf Hachaim 343:11; Ketzos Hashulchan 147 footnote 4; Piskeiy Teshuvos 343:9; See Pri Chadash (Yoreh De’ah, siman 81, se’if katan 26) who already protested and cried out sharply about this matter, stating as follows: Since in our times people are not careful with these matters of forbidden foods, most children go astray, and most of the insolent individuals of our generation lack any fear of Heaven that penetrates their hearts. Even when they are rebuked directly, they are not receptive to moral instruction. And who is greater for us than Elisha ben Avuyah? For he did not come to that path because of any later deed of his own, but rather because his mother, who was pregnant with him, passed by a place where food was being cooked for idolatry. She smelled it and felt a need to eat from it, and that substance permeated him like the venom of a snake.”
Time‑Dependent Prohibitions: The Achronim have discussed whether this negative effect applies also to permitted foods that become prohibited due to time-related restrictions, such as chametz on Passover, eating on Yom Kippur, and eating matzah on the day before Passover. [See Darkei Teshuvah 81:90; Ketzos Hashulchan 147 footnote 4] From the words of the Gemara in Yoma (82b), which discusses a pregnant woman who smelled food on Yom Kippur, it is evident that this category is also included. [Arugas Habosem O.C. 138] Nevertheless, it is certainly forbidden to be stringent in a situation involving even a possible danger to life, and the ruling must be determined according to the judgment of the halachic authority in each case. However, allowing a minor to eat before kiddush or havdalah is clearly more lenient according to all opinions, since this prohibition is merely a rabbinic safeguard enacted out of respect for the sanctity of the day. [Piskeiy Teshuvos 343:9]
[2] Ketzos Hashulchan 147 footnote 4
[3] Darkei Moshe O.C. 617:1 “One must be careful that a pregnant woman guard herself as much as possible that she does not eat pork and non-kosher meats as this will cause that her child will be God fearing”; Or Zarua 279; Yerushalmi Chagiga 9b regarding the mother of Acher that she had once eaten a non-Kosher food during her pregnancy due to having smelled it and lusted after it, and this is what caused her son to become a heretic; Sefer Shemiras Haguf Vihanefesh [Lerner] 142:1; Shevach Habris 1:24; Nitei Gavriel 3 56:5
[4] Rama Y.D. 81:7; Taz Y.D. 81:12; Shach Y.D. 81:24; Arugas Habosem O.C. 138; Sefer Shemiras Haguf Vihanefesh [Lerner] 142:1; 147:2;
[5] Shach Y.D. 81:24; P”M 81 M”Z 12; Sefer Shemiras Haguf Vihanefesh [Lerner] 147:3; Piskeiy Teshuvos 343:9