12 Tips to Optimize Your WordPress RSS Feed

Divi 3.0 Has Arrived! Introducing The Visual Page Builder So Ridiculously Fast & Easy-To-Use You’ll Think It’s Magic
September 8, 2016
The snippet preview: what it means and how to use it
September 8, 2016
Show all

Do you want to optimize your WordPress RSS feed? RSS feeds provide an easy way for your users to subscribe to your content. However, not many beginners know about how to make the most out of WordPress RSS feeds. In this article, we will share 12 tips on how to optimize your WordPress RSS feeds and boost your subscriptions.

Optimize Your WordPress RSS Feed

1. Optimize Your WordPress RSS Feed for Feedly

Feedly has quickly become the most popular feed reader after the demise of Google Reader. Optimizing your WordPress RSS feed for Feedly will help you get discovered on Feedly and offer a better user experience to your subscribers.

First you need to install and activate the Optimize Your Feed for Feedly plugin. For more details, see our step by step guide on how to install a WordPress plugin.

Upon activation you need to visit Settings » OYFFF page in your WordPress admin area to configure the plugin settings.

Optimize WordPress feed for Feedly settings

In the first option, you need to provide a large image to be used as the cover image for your website. After that you need to provide an SVG image to be used as your site’s icon.

If you have your logo image in PNG or JPEG, then you can use this online tool to convert PNG into SVG.

If you get a file type not allowed error during the upload, then you need to enable SVG upload in WordPress. Simply add this code to your theme’s functions.php file or in a site-specific plugin.

function cc_mime_types($mimes) {
  $mimes['svg'] = 'image/svg+xml';
  return $mimes;
}
add_filter('upload_mimes', 'cc_mime_types');

Next, you need to check the box for featured image option. However, if you are using custom code to add featured images into your RSS feed, then you will need to remove that code. Otherwise, feature images may appear twice in your feed.

After that you need to provide an SVG file to be used as a logo. Again, you can use your site’s logo for that just make sure that it has a fixed height (30px).

You can also choose an accent color which will be used on Feedly when displaying your site as a source.

Lastly, you can add your Google Analytics tracking ID. You can find this ID from your Google Analytics dashboard. It would look something like UA-XXXXXXX-X.

Don’t forget to click on the save changes button to store your settings.

2. Add a Follow on Feedly Button to Your Posts

You may also want to add a follow on Feedly button to your website. This will allow your users to directly subscribe to your RSS feed in Feedly.

First you need to visit the Feedly Button Factory website and click on a button design that you want to add. After that enter your RSS feed URL which looks like this:

http://yoursite.com/feed/

Follow on Feedly button

Feedly will generate a code snippet for you. You need to copy this code snippet and go to Appearance » Widgets page in your WordPress admin area.

After that, simply add a text widget to your sidebar and then paste the code snippet inside it.

3. Show Summary Instead of Full Article in RSS Feed

Showing your full article in RSS feed allows users to read it in their feed reader. This can affect your pageviews, advertisement revenue, and conversion rates.

Some publishers prefer to show summary instead requiring users to visit their website.

WordPress comes with a built-in solution. Simply visit Settings » Reading page in your WordPress admin and scroll down to ‘For each article in a feed, show’ option.

Show summary in RSS feed

Next, simply click on Summary to select it and then click on the save changes button to store your settings.

On the same settings page, you can also control the number of posts to display in your RSS feed. See our article on how to limit the number of posts displayed in WordPress RSS feed for detailed instructions.

4. Add Featured Image with WordPress Posts in RSS Feed

By default, WordPress does not add your post featured images in the RSS feed. Some feed readers like Feedly try to automatically use the first image in the article as featured image.

If you are not using the Optimize Feed for Feedly plugin, then you can use this method to add featured image to your RSS feed.

You will need to add this code to your theme’s functions.php file or in a site-specific plugin.

function rss_post_thumbnail($content) {
global $post;
if(has_post_thumbnail($post->ID)) {
$content = '

' . get_the_post_thumbnail($post->ID) . '

' . get_the_content(); } return $content; } add_filter('the_excerpt_rss', 'rss_post_thumbnail'); add_filter('the_content_feed', 'rss_post_thumbnail');

This code simply adds your featured image inside a paragraph just before the post content.

5. Add Content Before or After WordPress Posts in RSS Feeds

Want to add some custom content at the end or beginning of each item in your RSS feed? If you are already using the Yoast SEO plugin, then you are in luck. Head over to SEO » Advanced page and then click on the RSS tab.

Add custom content before or after each post in feed

Here you will see two text areas to add content before and after posts in your WordPress RSS feed. You will notice that Yoast SEO automatically adds ‘The post %%POSTLINK%% appeared first on %%BLOGLINK%%.’ after each post.

This protects you against content scrapers because now Google will always know that your site was the original source.

6. Add Custom Post Types to Your RSS Feed

Many WordPress sites use custom post types for content like recipes, reviews, etc. Each custom post type has its own RSS feed in WordPress. However, WordPress only shows ‘Posts’ in the main RSS feed.

You can add the following code to your theme’s functions.php file or a site-specific plugin to display custom post types in the main RSS feed.

function myfeed_request($qv) {
	if (isset($qv['feed']) && !isset($qv['post_type']))
		$qv['post_type'] = array('post', 'books', 'movies');
	return $qv;
}
add_filter('request', 'myfeed_request');

In this code, we have added two custom post types books and movies to the main RSS feed. Don’t forget to replace books and movies with your own custom post types.

For more detailed instructions see our guide on how to add custom post types to your main WordPress RSS feed.

7. Allow Subscribe to RSS Feed via Email

Not all your users know or want to use a feed reader to subscribe. Many users prefer to subscribe by email. You need to make sure that those users can easily sign up to receive your posts in their inbox.

Email subscription form on List25 website

There are many ways to add email subscription to your WordPress site. Most popular email marketing service providers offer RSS to email list option. This allows them to check your RSS feed for new content, and email that new content to your subscribers.

For more detailed instructions, take a look at our guide on how to add email subscriptions to your WordPress blog.

8. Allow Users to Subscribe to Categories in WordPress

Each category on your WordPress site has a separate RSS feed of its own. This allows your users to subscribe to specific categories that they are interested in.

However, most users are unaware that they can subscribe to specific categories. You can make it easier for users by adding links to category RSS feeds with subscription buttons.

Category subscription choices on WPBeginner

For more detailed instructions, see our guide on how to allow users to subscribe categories in WordPress.

9. Allow Users to Subscribe to Authors in WordPress

Subscribe to author RSS feed

If you run a multi-author blog, then your users may want to subscribe to their favorite authors. Just like categories and custom post types, each author in WordPress has a separate RSS feed.

This RSS feed is located at a URL like this:

http://www.example.com/author/tom/feed/

You can use this URL format to add links to author RSS feed in the author bio section.

For more ways to add author RSS feed, follow instructions in our guide on how to allow users to subscribe to authors in WordPress.

10. Show or Hide Content From RSS Feed Subscribers

Want to show bonus content to your RSS feed subscribers only? Some smart site owners use this for encouraging users to subscribe to their RSS feed.

On the other hand, some site owners may want to hide part of their content from RSS readers. This allows them to encourage users to visit their website.

First you need to install and activate the WP Kill in Feed plugin. For more details, see our step by step guide on how to install a WordPress plugin.

Upon activation, you can use the shortcode [addtofeed] to add feed only content, like this:

[addtofeed]
This content is for RSS feed subscribers only
[/addtofeed]

You can also use [killinfeed] shortcode to hide content from RSS feed.

[killinfeed]Content hidden from RSS feed subscribers [/killinfeed]

For more on this topic, check out our article on how to show content only to RSS feed subscribers in WordPress.

11. Add Social Buttons to Your WordPress RSS Feed

Share buttons in RSS feed

Many modern feed readers like Feedly, allow users to share articles from feeds they have subscribed. However, other RSS readers don’t have social sharing features or they are not very noticeable.

You can add your own social media icons to your WordPress RSS feed. Here is how:

First you will need to create image icons you want to use as buttons. For this tutorial we added icons for Facebook and Twitter to our demo site from Media » Add New page.

After uploading your icon image files, you need to copy their location and save it in a text editor like Notepad.

Media file location

Next you need to add this code to your theme’s functions.php file or a site-specific plugin.

// add custom feed content
function wpb_add_feed_content($content) {

// Check if a feed is requested
if(is_feed()) {

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

// Getting post title for the tweet
$post_title = get_the_title(); 

// Content you want to display below each post
// This is where we will add our icons

$content .= '

Share on Facebook Share on Twitter

'; } return $content; } add_filter('the_excerpt_rss', 'wpb_add_feed_content'); add_filter('the_content', 'wpb_add_feed_content');

Don’t forget to replace the src= attribute in the tag with the URLs of your own Facebook and Twitter icons.

You can now view your RSS feed in a feed reader, and you will see social sharing buttons for Facebook and Twitter.

See our article on how to add social buttons to your WordPress RSS feed for more detailed instructions.

12. Delay Posts from Appearing in RSS Feed

RSS feeds are often used by content scrapers to automatically fetch and display your content on their websites. If you have a new website with low authority, then these content scraping websites can beat you in search results.

One possible solution to combat this issue is by delaying posts from appearing in your RSS feed. This gives search engines time to crawl and index your content before it appears elsewhere.

You will need to add the following code to your WordPress theme’s functions.php file or a site-specific plugin.

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 = '10'; // 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');

This code adds a 10 minute delay before posts can appear in your RSS feed. You can change it to your own needs like 60 for one hour, or 120 for two hours.

For more on this topic, you may want to take a look at our article on how to delay posts from appearing in WordPress RSS feed.

We hope this article helped you optimize your WordPress RSS feed. You may also want to see our 18 useful tricks to speed up WordPress and boost performance.

If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.

The post 12 Tips to Optimize Your WordPress RSS Feed appeared first on WPBeginner.

View @t WP Beginner

Skip to toolbar