حَدَّثَنَا مُحَمَّدُ بْنُ صَالِحِ بْنِ الْوَلِيدِ النَّرْسِيُّ، ثَنَا مُحَمَّدُ بْنُ الْمُثَنَّى، ثَنَا إِسْمَاعِيلُ بْنُ سَعِيدِ بْنِ عُبَيْدِ اللهِ بْنِ جُبَيْرِ بْنِ حَيَّةَ، عَنْ أَبِيهِ، عَنْ زِيَادِ بْنِ جُبَيْرٍ، عَنْ أَبِيهِ، عَنِ الْمُغِيرَةِ بْنِ شُعْبَةَ، عَنِ النَّبِيِّ صَلَّى اللهُ عَلَيْهِ وَسَلَّمَ قَالَ: «الرَّاكِبُ خَلْفَ الْجَنَازَةِ , وَالْمَاشِي حَيْثُ شَاءَ , وَالطِّفْلُ يُصَلَّى عَلَيْهِ»
It is narrated from Sayyiduna Mughirah bin Shu'bah (may Allah be pleased with him) that the Prophet (peace and blessings be upon him) said: "The rider should walk behind the funeral, the one on foot may walk wherever he wishes, and the funeral prayer is offered over a child."