RSS is one of the main means of content delivering method bloggers use. Once you have installed WordPress blog the RSS link is automatically created which is similar to http://www.techinfoblog.net/feed/rss/. But most of the bloggers never give any thought to their RSS feed and how it displays. You can hack your WordPress blog’s RSS feed to make most out of it.
Here in this post I’m going to show you some of the greatest RSS feed hacks you can do and enhance the performance. Even some of the RSS feed tricks showed here can dramatically increase your readers list and get more loyal visitors.
1 – How To Display Post Thumbnails in the RSS Feed
Displaying post thumbnail in RSS feed will give lift to your article. Attractive and informative thumbnail will make readers to click on the article and read. Adding thumbnail to RSS feed can be done using editing your theme’s functions.php file and adding bellow code snippet.
// This script displays Post Thumbnails in the RSS Feed
function diw_post_thumbnail_feeds($content) {
global $post;
if(has_post_thumbnail($post->ID)) {
$content = '
' . get_the_post_thumbnail($post->ID) . '
' . $content;
}
return $content;
}
add_filter('the_excerpt_rss', 'diw_post_thumbnail_feeds');
add_filter('the_content_feed', 'diw_post_thumbnail_feeds');2 – Insert custom links to your RSS feed
Using below script you can add custom link or marketing message to your RSS feed. If you want to say or sell something you can add link to it on your RSS feed. Edit your theme’s functions.php file and add below script.
insertAds($content) {
$content = $content.'
Buy WordPress Premium Themes
';
return $content;
}
add_filter('the_excerpt_rss', 'insertAds');
add_filter('the_content_rss', 'insertAds');
?>3 – Excluding Unwanted or Private Category from your RSS feed
You can Exclude some of the categories from your RSS feed. Before you start off, get the category ID from WordPress admin go to “Posts” > “Categories” and add the following code snippet to your theme’s functions.php file.
function myFilter($query) {
if ($query->is_feed) {
$query->set('cat','-10'); //change category ID here (dont forget!!)
}
return $query;
}
add_filter('pre_get_posts','myFilter');4 – Create posts only for your RSS subscribers
This is one of the RSS feed hack so far I found. Using below script you can exclusively create a post to your RSS feed subscribers only. To start with create a category something like “Subscribers only” and note down the category ID and add into below script. This script also stays in your functions.php file. Whenever you wish to send exclusive post to your RSS subscribers select the category “Subscribers Only” and your loyal subscriber enjoys your post.
// show post thumbnails in feeds
function diw_post_thumbnail_feeds($content) {
global $post;
if(has_post_thumbnail($post->ID)) {
$content = '
' . get_the_post_thumbnail($post->ID) . '
' . $content;
}
return $content;
}
add_filter('the_excerpt_rss', 'diw_post_thumbnail_feeds');
add_filter('the_content_feed', 'diw_post_thumbnail_feeds');5 – Disable RSS feeds of your WordPress blog
If you wish to disable your RSS feed completely (really??) then you can use below script. Also you can enable your RSS feed back to normal by deleting the script (vice versa!). As usual this script also goes in-between your functions.php file.
/* This code snippet disables RSS feed */
function wp_disable_feed() {
wp_die( __('Sorry, no feeds available, return to homepage') );
}
add_action('do_feed', 'wp_disable_feed', 1);
add_action('do_feed_rdf', 'wp_disable_feed', 1);
add_action('do_feed_rss', 'wp_disable_feed', 1);
add_action('do_feed_rss2', 'wp_disable_feed', 1);
add_action('do_feed_atom', 'wp_disable_feed', 1);Those are some of the best on net RSS feed hacks you can use to enhance your feeds. Always make sure to take backup of your functions.php and blog database backup to avoid any fail attempts.
















After reading your post i have a better understanding about this.Your post have the information that is helpful and very informative. I would like you to keep up the good work.You know how to make your post understandable for most of the people.Thumbs up and Thanks.
thank you!
My recent post Meet Your New Online Friend wdyl.com – What Do You Love
The easiest solution would be to post it in a separate category and exclude that category from RSS Feeds with the use of Advanced Category Plugin
My recent post 5 Simple Steps To Increase Google Page Rank Fast-Tips
Thanks for commenting Anuj.
Hi Alex,
Thanks for the useful update. The change has been made.
Thanks