Sayyiduna al-Mughirah bin Shu'bah (may Allah be pleased with him) said: I think Qabisah, expressing his doubt, said: "The rider goes behind the funeral, and the one on foot walks behind it, in front of it, and to its right and left. The funeral prayer is offered for the miscarried child, and supplication is made for his parents for wellbeing and mercy."
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الجنائز / 6866