Q. I know there is a minhag for pregnant women or those of childbearing age not to go to a funeral. Is there a Halacha or minhag not to bring babies to a funeral or Shiva house?
What can be done when suddenly the mother has to attend the Levaya of a close relative or friend and does not have a babysitter?

A. Indeed different traditions are quoted by Poskim regarding women attending a funeral or entering a graveyard.
Horav Shlomo Miller’s Shlit’a opinion is that one should follow his own minhagim and the customs of the local Chevra Kadisha and Beis Olam (cementery).

The Rov also mentioned that in need one may bring a baby to a funeral procession, funeral home or a Shiva house as long as it does not disturb the others present.

Rabbi A. Bartfeld as revised by Horav Shlomo Miller, Horav Dovid Pam, Horav Aharon Miller and Horav Chanoch Ehrentreu Shlit’a