Wordpress Technology

Wordpress Tips, Tutorials, Hacks

Add Content to RSS Feed

Code for inserting your own content to every RSS Feed of WordPress based blog is very simple

It can be usefull for inserting ads or banners.

Include the code must in functions.php of your theme.

function insertFeedFooter($content) {
	if(is_feed()) {
		$content.= "<h3>Some title</h3>";
		$content.= "<p>Some Advertisement, or code, or something else.</p>";
	}
	return $content;
}
add_filter ('the_content', 'insertFeedFooter');

Enjoy!

Leave a trackback from your own site.

One Response to “Add Content to RSS Feed”

  1. Thanks for sharing this information. Useful though!

Leave a Reply

You must be logged in to post a comment.

© 2009 | Made by Vancouver Web Design | Internet Marketing