Praise be to Allah.
Ongoing charity (sadaqah jaariyah) is a kind of waqf (endowment), which is what is mentioned in the hadith of Abu Hurayrah (may Allah be pleased with him), according to which the Messenger of Allah ( blessings and peace of Allah be upon him) said: “When a man dies, all his good deeds come to an end except three: ongoing charity (sadaqah jaariyah), beneficial knowledge, or a righteous son who will pray for him.” Narrated by Muslim (1631).
An-Nawawi (may Allah have mercy on him) said, commenting on this hadith:
Ongoing charity (sadaqah jaariyah) is a type of waqf (endowment). End quote. Sharh Muslim (11/85).
Al-Khateeb ash-Sharbeeni (may Allah have mercy on him) said:
According to the scholars, ongoing charity (sadaqah jaariyah) is understood to refer to the waqf, as ar-Raafi‘i said. Other types of charity are not ongoing. Mughni al-Muhtaaj (3/522-523).
Ongoing charity (sadaqah jaariyah) is charity the reward of which continues after a person dies. As for the charity of which the reward does not continue, such as charity in the form of food given to a poor person, that is not ongoing charity.
Based on that, giving iftaar to those who are fasting, sponsoring orphans and taking care of the elderly – although these are acts of charity – are not ongoing charity. But you can contribute to the building of an orphanage or home for seniors, and that will be an ongoing charity for which you will earn reward so long as that institution continues to benefit people.
Types and examples of ongoing charity are many, including: building mosques, planting trees, digging wells, printing and distributing Mus-hafs, and spreading beneficial knowledge by producing books and tapes and distributing them.
It was narrated from Abu Hurayrah (may Allah be pleased with him), from the Prophet (blessings and peace of Allah be upon him) that he said: “Among the good deeds the reward of which will reach a believer after his death are: knowledge which he learned and then spread; a righteous son whom he leaves behind; a copy of the Qur’an that he leaves as a legacy; a mosque that he built; a house that he built for wayfarers; a canal that he dug; or charity that he gave during his lifetime when he was in good health. These deeds will reach him after his death.” Narrated by Ibn Maajah (242). Al-Mundhiri said in at-Targheeb wa’t-Tarheeb (1/78): Its isnaad is hasan. It was also classed as hasan by al-Albaani in Saheeh Ibn Maajah.
See also the answer to question no. 43101 .
The Muslim should give his charity to several causes, so that he will have a share of the reward from different sources. So you could allocate some of your wealth to providing iftaar for those who are fasting, another part for sponsoring orphans, a third part to support a seniors’ home, a fourth part to contribute to the building of a mosque, a fifth part to distributing books and Mus-hafs, and so on.
And Allah knows best.