WPBeginner

Beginner's Guide for WordPress

  • Blog
    • Beginners Guide
    • News
    • Opinion
    • Showcase
    • Themes
    • Tutorials
    • WordPress Plugins
  • Start Here
    • How to Start a Blog
    • Create a Website
    • Start an Online Store
    • Best Website Builder
    • Email Marketing
    • WordPress Hosting
    • Business Name Ideas
  • Deals
    • Bluehost Coupon
    • SiteGround Coupon
    • WP Engine Coupon
    • HostGator Coupon
    • Domain.com Coupon
    • Constant Contact
    • View All Deals »
  • Glossary
  • Videos
  • Products
X
☰
Beginner's Guide for WordPress / Start your WordPress Blog in minutes
Choosing the Best
WordPress Hosting
How to Easily
Install WordPress
Recommended
WordPress Plugins
View all Guides

WPBeginner» Blog» Tutorials» 12 Tips to Optimize Your WordPress RSS Feed

12 Tips to Optimize Your WordPress RSS Feed

Last updated on September 8th, 2016 by Editorial Staff
196 Shares
Share
Tweet
Share
Pin
Free WordPress Video Tutorials on YouTube by WPBeginner
12 Tips to Optimize Your WordPress RSS Feed

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

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 .= '<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 . '&amp;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');

Don’t forget to replace the src= attribute in the <img> 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.

196 Shares
Share
Tweet
Share
Pin
Popular on WPBeginner Right Now!
  • Revealed: Why Building an Email List is so Important Today (6 Reasons)

    Revealed: Why Building an Email List is so Important Today (6 Reasons)

  • How to Properly Move Your Blog from WordPress.com to WordPress.org

  • How to Fix the Error Establishing a Database Connection in WordPress

    How to Fix the Error Establishing a Database Connection in WordPress

  • Checklist

    Checklist: 15 Things You MUST DO Before Changing WordPress Themes

About the Editorial Staff

Editorial Staff at WPBeginner is a team of WordPress experts led by Syed Balkhi. Trusted by over 1.3 million readers worldwide.

The Ultimate WordPress Toolkit

4 Comments

Leave a Reply
  1. Hardik Sapkal says:
    Jan 13, 2021 at 10:20 am

    Bro thank you so much, you solved my problem.

    Reply
    • WPBeginner Support says:
      Jan 14, 2021 at 9:26 am

      Glad our recommendations were helpful :)

      Reply
  2. Cezar says:
    Jun 24, 2017 at 9:34 am

    Hi,

    4. Add Featured Image with WordPress Posts in RSS Feed is not working how is supose to work. Its showing full article instead of Summary (how i setup on Settings>Reading) and also showing 2 images check my website feed

    Reply
  3. danilo alba says:
    Oct 6, 2016 at 11:45 am

    Feedly conflicts with the sliders in the site, so if we have to choose between having a slider or having feedly

    Reply

Leave a Reply Cancel reply

Thanks for choosing to leave a comment. Please keep in mind that all comments are moderated according to our comment policy, and your email address will NOT be published. Please Do NOT use keywords in the name field. Let's have a personal and meaningful conversation.

Over 1,320,000+ Readers

Get fresh content from WPBeginner

Featured WordPress Plugin
MonsterInsights
MonsterInsights
Google Analytics made easy for WordPress. Learn More »
How to Start a Blog How to Start a Blog
I need help with ...
Starting a
Blog
WordPress
Performance
WordPress
Security
WordPress
SEO
WordPress
Errors
Building an
Online Store
Useful WordPress Guides
    • 7 Best WordPress Backup Plugins Compared (Pros and Cons)
    • How to Fix the Error Establishing a Database Connection in WordPress
    • Why You Need a CDN for your WordPress Blog? [Infographic]
    • 30 Legit Ways to Make Money Online Blogging with WordPress
    • Self Hosted WordPress.org vs. Free WordPress.com [Infograph]
    • Free Recording: WordPress Workshop for Beginners
    • 24 Must Have WordPress Plugins for Business Websites
    • How to Properly Move Your Blog from WordPress.com to WordPress.org
    • 5 Best Contact Form Plugins for WordPress Compared
    • Which is the Best WordPress Popup Plugin? (Comparison)
    • Best WooCommerce Hosting in 2021 (Comparison)
    • How to Fix the Internal Server Error in WordPress
    • How to Install WordPress - Complete WordPress Installation Tutorial
    • Why You Should Start Building an Email List Right Away
    • How to Properly Move WordPress to a New Domain Without Losing SEO
    • How to Choose the Best WordPress Hosting for Your Website
    • How to Choose the Best Blogging Platform (Comparison)
    • WordPress Tutorials - 200+ Step by Step WordPress Tutorials
    • 5 Best WordPress Ecommerce Plugins Compared
    • 5 Best WordPress Membership Plugins (Compared)
    • 7 Best Email Marketing Services for Small Business (2021)
    • How to Choose the Best Domain Registrar (Compared)
    • The Truth About Shared WordPress Web Hosting
    • When Do You Really Need Managed WordPress Hosting?
    • 5 Best Drag and Drop WordPress Page Builders Compared
    • How to Switch from Blogger to WordPress without Losing Google Rankings
    • How to Properly Switch From Wix to WordPress (Step by Step)
    • How to Properly Move from Weebly to WordPress (Step by Step)
    • Do You Really Need a VPS? Best WordPress VPS Hosting Compared
    • How to Properly Move from Squarespace to WordPress
    • How to Register a Domain Name (+ tip to get it for FREE)
    • HostGator Review - An Honest Look at Speed & Uptime (2021)
    • SiteGround Reviews from 4464 Users & Our Experts (2021)
    • Bluehost Review from Real Users + Performance Stats (2021)
    • How Much Does It Really Cost to Build a WordPress Website?
    • How to Create an Email Newsletter the RIGHT WAY (Step by Step)
    • Free Business Name Generator (A.I Powered)
    • How to Create a Free Business Email Address in 5 Minutes (Step by Step)
    • How to Install Google Analytics in WordPress for Beginners
    • How to Move WordPress to a New Host or Server With No Downtime
    • Why is WordPress Free? What are the Costs? What is the Catch?
    • How to Make a Website in 2021 – Step by Step Guide
Deals & Coupons (view all)
Advanced Coupons
Advanced WooCommerce Coupons
Get 50% off the Advanced Coupons smart coupons plugin for WooCommerce.
Network Solutions
Network Solutions Coupon
Get 25% off Network Solutions and save big on your new domain registration fees.
Featured In
About WPBeginner®

WPBeginner is a free WordPress resource site for Beginners. WPBeginner was founded in July 2009 by Syed Balkhi. The main goal of this site is to provide quality tips, tricks, hacks, and other WordPress resources that allows WordPress beginners to improve their site(s).

Join our team: We are Hiring!

Site Links
  • About Us
  • Contact Us
  • FTC Disclosure
  • Privacy Policy
  • Terms of Service
  • Free Blog Setup
  • Free Business Tools
  • Growth Fund
Our Sites
  • OptinMonster
  • MonsterInsights
  • WPForms
  • SeedProd
  • Nameboy
  • RafflePress
  • Smash Balloon
  • AIOSEO

Copyright © 2009 - 2021 WPBeginner LLC. All Rights Reserved. WPBeginner® is a registered trademark.

Managed by Awesome Motive | WordPress hosting by SiteGround | WordPress Security by Sucuri.