حَدَّثَنَا عَبْدَانُ بْنُ أَحْمَدَ، ثَنَا إِبْرَاهِيمُ بْنُ الْمُسْتَمِرِّ الْعُرُوقِيُّ، ثَنَا قُرَّةُ بْنُ حَبِيبٍ، ثَنَا عَبْدُ اللهِ بْنُ بَكْرٍ الْمُزَنِيُّ، ثَنَا يُونُسُ بْنُ عُبَيْدٍ، عَنْ زِيَادِ بْنِ جُبَيْرٍ، عَنْ أَبِيهِ، عَنِ الْمُغِيرَةِ بْنِ شُعْبَةَ، قَالَ: قَالَ رَسُولُ اللهِ صَلَّى اللهُ عَلَيْهِ وَسَلَّمَ: «الرَّاكِبُ خَلْفَ الْجَنَازَةِ , وَالْمَاشِي حَيْثُ شَاءَ مِنْهَا , وَالطِّفْلُ يُصَلَّى عَلَيْهِ»
It is narrated from Sayyiduna Mughirah bin Shu'bah (may Allah be pleased with him) that the Messenger of Allah (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."