7 Tips and Tricks to Get the Most Out of Your WordPress RSS Feeds

Although RSS feeds do not have a ton of functionality on offer, webmasters can add custom code to their site to implement amazing features. In this post, we'll cover some incredibly useful tips and tricks to help you get started.
Table of Contents

Sponsored Ad

If you purchase through a link on our site, we may earn a commission.

Publishing and sharing content through RSS feeds is still relevant today – even as Twitter usage continues to increase.

Webmasters often overlook the robust functionality RSS feeds have to offer owing to the fact that they are seemingly difficult to configure. Plugins solved this to some extent yet the problem surfaces every now and again.

RSS feeds are incredibly powerful on their own yet there are several ways by which you can improve your WordPress RSS feed to deliver and gather more value from it. With this in mind, in this post, we’ll cover some tips and tricks that you can employ to refine your site’s RSS feed – the right way!

Let’s get right to it!

Before we get started, if you’re not sure how to create RSS feeds, check outΒ How to Create Custom RSS Feeds in WordPress to setup your very own RSS feed.

Linking Back to the Original Post

One of the biggest problems with RSS feeds is that smaller blogs try to republish the RSS feeds created by bigger blogs with a purpose to outrank the original article. If your RSS feed isn’t configured to add a link back to the original post within the article, chances are someone’s going to parse your content and republish it on their own blog without your knowledge or consent.

The best way to resolve this issue is to link back to your original post. By appending the code given below to your RSS feeds you can effectively let your viewership know that the content was originally published on your website.

https://gist.github.com/rafaysansari/d2b4e6e0acec39cf0f7971ae5d24f3e3

All this code does is that it adds some lines of text at the end of your blog posts which work as a disclaimer of sorts. You can modify the disclaimer message in line 4 to display a custom message.

Adding Feed-Only Content

WordPress features a pretty amazing feature which enables webmasters to display RSS feed-only content in blog posts using a shortcode. By implementing this functionality, when a reader lands on your blog post published on your website they won’t see the content enclosed in the shortcode. If they open up their RSS reader, the RSS feed-only content will be visible to them at the end of the blog post.

Here’s the code snippet that you’ll have to add to your functions.php file in order to generate the shortcode:

https://gist.github.com/rafaysansari/5abc09e7eba7433f7ab0bc8eed5bd3f6

To implement the shortcode in your blog posts, simply wrap the feedonly shortcode around the RSS feed-only content.Β You can change the name of the shortcode by replacing feedonly in line 5 with a shortcode name of your own choice. Here’s a quick implementation:

https://gist.github.com/rafaysansari/6c39e271c0d9a157157b8e782f2749eb

That’s all there is to it. The line This line will only be displayed in the RSS feed. Pretty cool, right? will not appear in the blog post when a reader accesses your website.

Adding Custom Fields

By default, WordPress allows the addition of custom fields in blog posts. This is mainly used to associate additional information about the post without having to open up the blog post itself. Although this functionality is incredibly useful, it doesn’tΒ have a mapping onto RSS feeds from the get-go.Β RSS feeds are configured to display content only.

To add custom fields to your RSS feed, add the following code snippet to your functions.php file:

https://gist.github.com/rafaysansari/2559052fa22c14538a364cc93fcb0aeb

Adding custom fields to your RSS feeds ensures that your RSS traffic also receives the same amount of information as your website traffic. Custom fields help readers filter blog posts and evaluate their relevance to their query without actually having to open them.

If you’d like to get even more out of your RSS feeds, be sure to check outΒ How to Achieve More with RSS Feeds – A Review of WP RSS Aggregator!

Adding Text and Images

RSS feeds do not allow webmasters to append text or images to the end of their blog posts by default. Adding text to RSS feeds lets users communicate additional information to their readers – whether it’s a disclaimer, an advertisement, special offers, or copyright information.

By using the following code snippet, you’ll be able to add any kind of text content to the end of your RSS feed:

https://gist.github.com/rafaysansari/75eadf9628adbca300413480d1c687fd

You can change the message that will be displayed by modifying line 4 in the code above. This code snippet makes it so the text is only visible on your RSS feeds. Readers who access the blog post from your website will not be able to see the additional line of text.

A similar function can be used to add an image to your RSS feed. This feature is commonly used to add headers, banners, and other promotional or affiliate links.

https://gist.github.com/rafaysansari/62f5367136c4d9485c5c69935ee06c26

By modifying line 4 in the code snippet given above, you can control which image will be displayed and edit the URL it redirects to. This is a great way to reach a wider audience with promotional offers and special discounts.

Did you know our WP RSS Aggregator plugin can be used to import images from Instagram? Check out this in-depth tutorial onΒ How to Import from Instagram to WordPress with WP RSS Aggregator to get started!

Adding Featured Images

As we mentioned above, RSS feeds do not pick up the custom fields associated with a particular blog post. This means that if you’ve added a featured image or a thumbnail, it won’t show up on your RSS feed unless you explicitly code in the functionality.

Here’s a code snippet that lets you do just that:

https://gist.github.com/rafaysansari/03875e84d62b6278fd1a50fbc0ace901

Featured images enhance your blog posts visual appeal – whether they’re being viewed on the website or an RSS feed.

Excluding Categories

In some cases, we want categories to be excluded from the content that is displayed on the RSS feed. Though default functionality isn’t available to help execute this, you can implement the following code in your site’s functions.php file to exclude categories:

https://gist.github.com/rafaysansari/3e3e0e77640677d163b23bfc35bc9f11

This function will run before the get_posts() method and will exclude categories if the blog post has been requested from an RSS feed.

Disabling RSS Feeds

If you’d like to completely disable RSS feed functionality from your site’s blog, you can use this code snippet:

https://gist.github.com/rafaysansari/c941f04f0a1c9ada1d0b8f5282311344

It allows webmasters to disable all of the RSS feed formats. The code given in line 2 will display a custom message that you can use to tell your readers why the RSS feed has been disabled and redirect them to your website’s blog.

For even more information on RSS feeds be sure to check out ourΒ 10 Creative and Useful Ways to Use RSS Feeds.

Wrapping It Up

It isn’t uncommon to happen upon some default featuresΒ of RSS feeds that require some hand-coded improvement. Once you’ve got some custom code in place there’s no limit to how much you can personalize your RSS feeds to deliver more value to your viewership.

We covered some tips and tricks to help you get started with customizing your RSS feeds and get the most out of them. All that’s left to do is add the functionality and modify the output messages. Once you’ve done that, you’ll be good to go!

Which tips did you find useful? Were you able to implement all of the functionality on your WordPress blog’s RSS feed? We’d love to hear all about your experience so let us know by commenting below!

Rafay is an entrepreneur, computer scientist, professional writer for several high-traffic websites, and founder of Blogginc. He provides byline and ghost-writing services for digital and brick-and-mortar businesses with a focus on web development, WordPress, and entrepreneurship.

Sponsored Ad

If you purchase through a link on our site, we may earn a commission.

All suggestions are anonymous.

More from our blog...

2 Responses

  1. RAFAY

    Thanks for the article.

    Will the snippet of code for Linking Back to the Original Post work if I add it via my Edit CSS plugin?

    NEAL

Post a Comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Stay updated with WP Mayor's newsletter showcase every week

Stay on top of every new WordPress innovation and latest launches. Receive all our fresh product reviews and expert guides directly in your inbox.

Hosting Survey 2024

Are you happy with your hosting provider or are you over-paying for too little? Have your say below!

"*" indicates required fields

What's the main reason you picked this host?*
How happy are you with your host?*

OPTIONAL: If you'd like to receive the results of this survey, please enter your details below.