Monetizing RSS feeds has becomw a common practice, and many blogs do it to maximize their income. FeedBurner can insert AdSense ads into your feed items, but you need at least 500 subscribers to qualify, and you can’t use any ads other than the AdSense ads provided by FeedBurner. So what is the workaround? What if you want to show images in the feeds? Well thats quite easy!
Follow these simple steps to perform this hack:
I have seen many similar hacks on the Web, but all of them require you to edit WordPress core files to achieve the same result. Of course, editing WordPress core files is a very bad idea because then you would have to re-edit the files each time you upgrade your blog. Instead, this hack uses the add_filter() WordPress function to insert content into your RSS feed without editing any core files.
Source:
SmashingMagazine
For any doubts or additions please do use the comment form.
Follow these simple steps to perform this hack:
- Edit the functions.php file of your theme. If your theme doesn’t have a functions.php file, simply create one.
- Paste the following code into your functions.php file:
- Save the file. You’re now displaying your ads in your RSS feed!
<?php function insertAds($content) { $content = $content.'<hr /><a href="http://www.wprecipes.com">Have you visited WpRecipes today?</a><hr />'; return $content; } add_filter('the_excerpt_rss', 'insertAds'); add_filter('the_content_rss', 'insertAds'); ?>
I have seen many similar hacks on the Web, but all of them require you to edit WordPress core files to achieve the same result. Of course, editing WordPress core files is a very bad idea because then you would have to re-edit the files each time you upgrade your blog. Instead, this hack uses the add_filter() WordPress function to insert content into your RSS feed without editing any core files.
Source:
SmashingMagazine
For any doubts or additions please do use the comment form.
Comments
Post a Comment