"The Messenger of Allah said: The riders should move behind the Janazah and the pedestrian may walk wherever he wishes, and the (funeral) prayer should be offered for a child."' (Using translation from Nasāʾī 1942)
قَالَ رَسُولُ اللهِ ﷺ الرَّاكِبُخَلْفَ الْجِنَازَةِ وَالْمَاشِي حَيْثُ شَاءَ مِنْهَا وَالطِّفْلُ يُصَلَّى عَلَيْهِ