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.
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:
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:
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
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:
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.
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:
Featured images enhance your blog posts visual appeal – whether they’re being viewed on the website or an RSS feed.
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:
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:
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!