10 Tips To Improve Your WordPress RSS Feed

For a subscription-based website, an RSS feed is the most popular method of increasing the views of the site. Many beginners and amateurs do not know how to improve WordPress RSS feed. Hence, in this short read, we have included everything for your learning and reference purposes.

Substitute the Full Article with Summary

The users can read the entire article on their feed reader. This will significantly affect conversion rates, page views, and advertisement revenue.

WordPress RSS Feed

Sometimes it is the publishers that intend to show the summary which will mandatorily require the viewer to visit the site.

Pic1

WordPress offers its users a built-in solution that enables them to improve WordPress RSS feed. Visit the reading page from the Settings menu of the WordPress Admin.

Here select the option that says “for each article in a feed show”. For the next step click on the summary option and then to store your settings select the save changes button.

A user can also control the number of posts to display from the same settings options page.

Include a featured Image

By default, the post featured images are not added in the RSS feed by WordPress. If you use some external or third party feed-reader plugins they might do it but it needs to be checked.

If you aren’t using any optimized plugin that does this job for you then you will have to code for the same. In the site-specific plugin or in the theme’s function.php file add the following code.

function rss_post_thumbnail($content) {
global $post;
if(has_post_thumbnail($post->ID)) {
$content = ‘<p>’ . get_the_post_thumbnail($post->ID) .
‘</p>’ . get_the_content();
}
return $content;
}
add_filter(‘the_excerpt_rss’, ‘rss_post_thumbnail’);
add_filter(‘the_content_feed’, ‘rss_post_thumbnail’);

When you add this code it will ensure that the featured image is displayed inside a paragraph before the post content.

Add Content before/after post

Adding content at the beginning or end of the post in your RSS feeds essentially contributes to you goal which is to improve WordPress RSS feed.

This can be easily done with the help of a plugin. You can search for an efficient plugin in the WordPress directory according to your site requirement.

Pic2

 

Doing this helps your content to be recognized as an original source by search engines hence you are also protected from content scrappers.

Add Custom Post Types

Depending upon the purpose different sites use custom post types for featuring content like reviews, recipes, and others. In WordPress, a unique RSS feed is assigned to every custom post type. But in the main RSS feed, only ‘Posts’ is displayed.

To display custom post types in the add the following code in the spite-specific plugin or in the theme’s function.php file.

function myfeed_request($qv) {
    if (isset($qv[‘feed’]) && !isset($qv[‘post_type’]))
        $qv[‘post_type’] = array(‘post’, reviews’, recipes’);
    return $qv;
}
add_filter(‘request’, ‘myfeed_request’);

If you have noticed, in the above code, we have added reviews and recipes, as the two custom post types. Please substitute them with your actual types so that you get the desired results. Anything else other than the names requires no change.

Subscribe via Email

A feed reader is not the preference of all the readers as some of them intend to subscribe via email. When you ensure that they can conveniently subscribe to the emails then it can help you to improve WordPress RSS feed.
Pic3

There are simple and multiple ways of doing it. RSS to email option is provided by all popular email marketing service providers. Indirectly you enable them to check your site for new content and then mail the same to the subscriber.

Subscription for categories

There is a separate RSS feed for each category on a WordPress site. This enables users to subscribe to a specific category that interests them.

Most of the users are unaware of it and this is the major lapse on their part. If you can manage to add subscription buttons with links to category RSS feeds then it will be easier for them.

This will allow them to revisit your site whenever there is an update on the content of a specific category.

Subscription for Authors

Your audience will be interested in subscribing to the blogs of their favorite ones if you run a multi-author blog. Here also it has a separate RSS feed just like in custom post types and categories.

You can make a major difference by enabling the users to subscribe to their authors. This will also help you to analyze the best and worst-performing authors of your site. Hence, you can also manage the content of the site according to the expectations of the audience.

Use the Show and Hide Content tactic

This is amongst the prominent tactics to improve WordPress RSS feed. You can choose to display specific content only to the users who have subscribed to your feed. And the other way around hide specific content for the users that have not subscribed to the feed.

This directly influences the users to opt for subscription so that they can get the necessary information which is important or of interest to them.

You can easily find plugins in the WordPress directory which will help you with this task. Sometimes with certain plugins, you will have to enter shortcodes at certain places so check the plugin and read the reviews before finalizing one.

Integration of Social Medial Icons with posts

Adding social media icons on the feed itself helps users to share the content on various social media platforms. The first step in doing this is to create buttons from image icons that you want to use.
Pic4

Go to the Add New Page from the Media Menu and add the social media icons of handles that you require.

Pic5

After a successful upload, copy the location and save it in a file. The next step will be to add the following code in the site-specific plugin or in the theme’s function.php file.

// for custom feed’s content
function wpb_add_feed_content($content) {

 // Check for an existing requested feed
if(is_feed()) {

 // Encoding for sharing post link
$permalink_encoded = urlencode(get_permalink());

 // Post title acquisition for a tweet
$post_title = get_the_title();

 $content .= ‘<p>
<a href=”http://www.facebook.com/sharer/sharer.php?u=’ . $permalink_encoded . ‘” title=”Share on Facebook”><img src=”Facebook icon file url goes here” title=”Share on Facebook” alt=”Share on Facebook” width=”64px” height=”64px” /></a>

 <a href=”http://www.twitter.com/share?&text=’. $post_title . ‘&url=’ . $permalink_encoded . ‘” title=”Share on Twitter”><img src=”Facebook icon file url goes here” title=”Share on Twitter” alt=”Share on Twitter” width=”64px” height=”64px” /></a>
</p>’;
}
return $content;
}

add_filter(‘the_excerpt_rss’, ‘wpb_add_feed_content’);
add_filter(‘the_content’, ‘wpb_add_feed_content’);

Please ensure that you replace the source attribute with your own specific URL or else the code will not work.

Delay Post Appearance

Content scrapers often target the RSS feed to fetch your content and display the same on their website. If you have a potential content but in a new site then these existing powerful sites will beat you in the search engine results.

The only solution to this problem is to delay the post from appearing. Through this method, we indirectly provide sufficient time to the search engine to crawl and index your content.

The following code is required to be copied in the site-specific plugin or in the theme’s function.php file for making changes.

function publish_later_on_feed($where) {

   global $wpdb;

     if ( is_feed() ) {
        // timestamp in WP-format
        $now = gmdate(‘Y-m-d H:i:s’);

// value for wait; + device
       $wait = ‘6’; // integer

       // http://dev.mysql.com/doc/refman/5.0/en/date-and-time-functions.html#function_timestampdiff
        $device = ‘MINUTE’; //MINUTE, HOUR, DAY, WEEK, MONTH, YEAR

        // add SQL-sytax to default $where
       $where .= ” AND TIMESTAMPDIFF($device, $wpdb->posts.post_date_gmt, ‘$now’) > $wait “;
    }
   return $where;
}

add_filter(‘posts_where’,
‘publish_later_on_feed’);

In the above code, we have added a six-minute delay for appearing but you can easily modify it as per your needs.

About Sonnal S Sinha

Sonnal S SinhaSonnal S Sinha is a passionate writer as well as WordPress and WooCommerce rockstar who loves to share insights on various topics through his engaging blog posts. He runs a successful website design and digital marketing company. With 15+ years of experience in WordPress theme development, he strives to inform and inspire readers with his thought-provoking content. He helps thousands of small and medium businesses and startups create a unique online presence. Follow Sonnal S Sinha for your regular dose of knowledge and inspiration.