Monday, 24 October 2011

How to add custom content to RSS Feed posts in wordpress?

In the previous posts I shared how to add custom content to wordpress posts. Now I will share you how to add custom content to RSS feeds.
RSS (Rich Site Summary) is a format for delivering regularly changing web content. Now a day the sites using RSS feeds are increasing rapidly. Any end user may subscribe to the site RSS feeds .The users who subscribed will get all the latest updates, the user will directly go to the RSS feed our website and see the posts. Like this we may increase the number of users but the subscribed user even won’t come back to our website.

To make our subscribers to visit our home page frequently here is the solution. Add the site home link to all your RSS feeds. To achieve this add the following code to your theme functions.php file.

function addToRSS($content) { return $content.'Remember to stop by at Indian Recipes '; }
add_filter('the_excerpt_rss', 'addToRSS');
add_filter('the_content_rss', 'addToRSS');