It was narrated to us by Moḥammed bin ʿAlī رحمه الله, who said, it was narrated to us by ʿAlī bin Ibrāhīm, from Moḥammed ibn ʿĪsa, from Manṣūr, from Hishām bin Sālim:1

From al-Ṣādiq, Jaʿfar bin Moḥammed عليهما السلام, who said: There is nothing of reward that carries on after a man dies except three things.
1. An on-going Charity which continues during his life, in which the reward carries on after his death.
2. A sunnah2 which guides that he carries out, which others act upon after his death.
3. And a virtuous child that seeks forgiveness [from Allāh] on his behalf.

1. al-Shaykh Hādi al-Najafi says this ḥadīth has an authentic chain [Mawsūʿat al-Aḥādīth ahl al-Bayt, Volume 12, Page 224-225]; This ḥadīth is also found in al-Kāfi with a reliable chain.
2. A custom, line of conduct, tradition, or practice of some sort.

حدثنا محمد بن علي ( رحمه الله ) ، قال : حدثنا علي بن إبراهيم ، عن محمد ابن عيسى ، عن منصور ، عن هشام بن سالم ، عن الصادق جعفر بن محمد ( عليهما السلام ) ، قال : ليس يتبع الرجل بعد موته من الاجر إلا ثلاث خصال : صدقة أجراها في حياته فهي تجري بعد موته ، وسنة هدى سنها ، فهي يعمل بها بعد موته ، وولد صالح يستغفر له