Ads into WordPress Feeds

Many of your readers just grab your rss feed and might never return to your web page! That way you might be losing money from the advertisements you have put inside your content. To avoid that, we will show you a way to include your ads inside your feeds.

Just paste the following code inside your theme’s functions.php file (create one if it doesn’t exist):

<?php
function rssAds ($content) {
if(is_feed()){
$content = $content.'<hr />For WordPress resources visit <a href="https://www.wpressious.com">Wordpressious.com</a><hr />';
}
return $content;
}
add_filter('the_content', 'rssAds');
?>

Really simple, isn’t it?

Do you know of a better way to do this or a plugin with the same result? If so, let us know!

CATEGORY: Tips & Tricks
DATE: February 14th, 2010 & LEAVE YOUR COMMENT HERE

FILTER BY

Colors