Hadith 18162

حَدَّثَنَا عَبْدُ الْوَاحِدِ الْحَدَّادُ ، حَدَّثَنَا سَعِيدُ بْنُ عُبَيْدِ اللَّهِ الثَّقَفِيُّ ، عَنْ زِيَادِ بْنِ جُبَيْرٍ ، عَنِ الْمُغِيرَةِ بْنِ شُعْبَةَ ، قَالَ : قَالَ رَسُولُ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ : " الرَّاكِبُ خَلْفَ الْجِنَازَةِ ، وَالْمَاشِي حَيْثُ شَاءَ مِنْهَا ، وَالطِّفْلُ يُصَلَّى عَلَيْهِ " .
It is narrated from Hazrat 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 follow behind the funeral, and the one walking on foot has the choice (to go ahead or behind, to the right side or to the left side), and the funeral prayer will be offered for a minor child.
Hadith Reference مسند احمد / أول مسند الكوفيين / 18162
Hadith Grading حکم دارالسلام: حديث صحيح، وقد اختلف فى رفعه ووقفه