How to set up RSS Feeds on WordPress website - Complete Guide


Published at tips tricks by Elle Holder on 02nd Apr 2021

RSS feeds have been around for a long time now. Even WordPress RSS feeds. In fact, there are some that call them old-school, as if old-school is no longer useful. Pay no attention to those people. RSS feeds are still in use because they are useful! And a lot of people who thought the technology was behind them are revisiting it

Whether you are completely new to RSS or whether you’re new to WordPress RSS feeds, here’s all the info you need and all the reasons why you should be using it.

Table of Contents

What is a WordPress RSS Feed?
Why Use a WordPress RSS Feed?
Adding a WordPress RSS Feed to Your Dashboard
How to Display an External WordPress RSS Feed
How to Enable Images in a WordPress RSS Feed
Scheduling Posts in Your WordPress RSS Feed
Exclude Categories from Your WordPress RSS Feed

What is a WordPress RSS Feed?

Before we get to answering the what is a WordPress RSS feed question, let’s address the more basic question. Then we’ll weave the WordPress aspect of it in.

RSS is the acronym used for Really Simple Syndication or Rich Site Summary. You’ll often hear of see it referred to as an RSS feed, or simply a feed.

RSS Feed Icon

Source: Wikipedia   

Depending on how old you are, you may or may not remember the early days of the internet. Back when bookmarking sites were popular. That’s what you needed to do to remember your favorite sites. And then you needed to visit them daily, always manually checking for updates.

Then came RSS. This reversed the need for manually checking. Now users have the ability to choose a feed—or channel, if you will—and be automatically notified anytime there is an update.

So RSS is beneficial for everyone. For the content provider and their followers.

Let’s say you set up a WordPress RSS feed. Now your content is syndicated, and anyone interested in following it simply needs to subscribe. Once everything is launched, no one needs to do any further work. It’s all running in the background.

So that covers all the generalities of an RSS feed. What about WordPress RSS feeds specifically?

Frankly, it’s not that different. Whatever content you provide on your WordPress site can be made available via an RSS feed. But set up might be a bit different, and there are multiple WordPress RSS feed plugins and or aggregators you might choose to use. So let’s dig into everything you need to know about setting up an RSS feed on your WordPress.org site.

Why Use a WordPress RSS Feed?

You have great content, right? And you don’t want anyone to forget you have great content. Because face it, for every awesome and informative site on the internet, there are 10 more.

The best way to keep your content visible, and to keep people reading it, is to provide them with a feed. Because now you don’t need to rely on their memory or some lame bookmark they’ve made for your site. Every time you have fresh new content, they’ll know.

Some might feel this is defeating the purpose, especially if they have a monetized site. Because you want readers to physically visit your site. You need them there for income purposes.

Well, you can set your WordPress RSS feed to either provide your content in full or just a snippet of your content. Just be aware there is a lot of debate over serving full or partial feeds. Because you may not be considering reader preferences, and that could work against you. But I’m not here to talk about the whys and why nots. I’m just here to tell you the how tos.

Adding a WordPress RSS Feed to Your Dashboard

Now that you’ve decided it’s a really smart idea to add a feed to your dashboard, it’s time to implement it. And don’t worry, WordPress RSS feed settings are fairly simple to put in place.

Step 1

Go to your WordPress dashboard and then select Appearance >Widgets.

WordPress RSS Feed Step 1

Step 2

Scroll down until you find the RSS widget, and then drag it over to the right and put it in the section you want it to appear. Keep in mind every theme is different, so you might not have a layout option similar to what’s pictured below. In this case, we’re putting the RSS widget at the top of our sidebar.

WordPress RSS Feed Step 2

Step 3

Using the little arrow at the top right of the widget, open it up. This will give you access to the settings panel and configuration options.

WordPress RSS Feed Steps 3 and on

Step 4

Enter your RSS URL n the Enter the RSS Feed URL Here text box. (More details on how to find your URL can be found below the final step)

Step 5

This step is optional, but a good idea. Choose a title for your feed and add it to the Give the Feed a Title box.

Step 6

You can choose to display between 1 and 20 items on your feed, so input your choice here.

Step 7

This is another optional step. If you want your feed to display the content of your post and not just the title, check box one. You can also choose to show the post’s author in the feed and the date it was posted.

Step 8

Save your changes.

How to Find Your WordPress RSS Feed URL

This is simple, and there are a few ways to do it. Your WordPress site will have a default RSS feed set up by default, but here’s the best way to find it.

Go to Feedburner.Google.Com.

Feedburner Step 1

Simply fill in the field with your site’s URL and move to the next page where you will get something like this:

Feedburner Step 2

And those are your feeds. The one you likely want to add in Step 4 above is the first one, which is your main WordPress RSS feed.

And that’s it!

The above is really all you need, and you’re provided with the ability to add your RSS feed natively. But there are several WordPress RSS feed plugins to choose from as well.

Why would you want to use a plugin instead of making use of the built-in function in WordPress? Because the native feature is bare bones.  If you want greater functionality, such as the ability to customize your social buttons and thumbnails, you’ll need a plugin. It will just provide you with more options.

If you do decide you would like to use a plugin, there are several to choose from.

Here’s a quick list of some of the best WordPress RSS feed plugins available in 2021. I’m just listing them alphabetically, not by rank.

Different plugins will have different options and features so it’s a matter of choosing the best one for your needs.

And of course, you aren’t limited to those options. You can go to WordPress.org and check out all the RSS feeds listed there, by doing a search on RSS in the plugins section.

WordPress RSS Feed Plugins

Source: WordPress

Whether you end up opting for the built-in RSS or going with a plugin, you always have someone to reach out to if your WordPress RSS Feed is not working and you need to troubleshoot.

How to Display an External WordPress RSS Feed

There may be times when you want to add other content to your feed, not just the content from one specific site. Perhaps you have several sites or blogs that you own or manage and would like to syndicate that content along with your main content.

In this case, you’ll need to display an external WordPress RSS feed. And fortunately, it’s very simple to do.

The first thing I recommend is creating a custom page. This will provide you with a placeholder for the following code. In case you’ve never created one, here are the steps.

Step 1

Open whatever text editor you use on your computer and paste this line of code to the top.

You can change the name to whatever you want or leave as is. Now you want to save it somewhere as a .php file.

Step 2

Using an FTP client, connect to your web host's server where your WordPress files are. Once you’ve connected, find your current child theme. It will be located in your wp-content/themes/ directory. Now simply upload the .php file you just created to your theme’s folder.

External WP RSS Feed

Step 3

Login to your WordPress admin and create a new page using the template you just created.

Add Page >Page Attributes >Templates >Choose your new template.

Custompage

Step 4

Now you want to add the following to the new page you just created. Just be sure to update whatever info you need, including the feed URL, quantity, and anything else.


get_item_quantity( 5 ); 
    // Build an array of all the items, starting with element 0 (first element).
    $rss_items = $rss->get_items( 0, $maxitems );
endif;
?>

Source: WPBeginner

Now you can pull in external WordPress RSS feeds from anywhere you want.

How to Enable Images in a WordPress RSS Feed

Do your posts have a featured image? They should! And if that image perfectly represents your post, you should include that in your feed. It can be done natively or with a plugin.

You can add a WordPress RSS Feed plugin with image capability, or you can do it natively. I’m going to show you the second since I’m a big believer in keeping plugins to a minimum if possible. Keep your plugins to really important things like WPBlazer. But if you’re not comfortable making changes to core files, please use a plugin.

If you are going to go ahead without, be sure to backup your functions.php first since that’s where the change will be made. And you do not want to somehow destroy this file!

Add the following to your functions.php:

ID ) ){
      $prepend = '
' . get_the_post_thumbnail( $post->ID, 'medium', array( 'style' => 'margin-bottom: 10px;' ) ) . '
'; $content = $prepend . $content; } } return $content; }

Source: SmartWP

That simple change will add your featured image to your WordPress RSS feed.

Scheduling Posts in Your WordPress RSS Feed

While it’s not necessary to schedule posts since WordPress will automatically include them in your feed as soon as you publish them, there may be times you want to delay and schedule a post in your WordPress RSS feed.

You’ll need to add this code to your functions.php file. And as I said above, make sure you back it up before making any changes.

Copy and paste the following.

function scheduled_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', 'scheduled_feed');

Once you have pasted in the code, you’ll need to make a few alterations to suit your needs.

First, find the $device variable and change it to days, hours, minutes, whatever. And change the $wait to whatever number you want. So you will end up with something like 5 days, or 5 hours, or 5 minutes, and so on.

Then save your changes.

And you’re done! You’ve scheduled posts in your WordPress RSS feed.  

Exclude Categories from Your WordPress RSS Feed

If you blog, you’ll often have at least one category that’s not necessarily something you want or need to add to your feed. At least I’ve always found that to be true. So it’s a really good thing you can exclude whatever categories you want from your WordPress RSS feed.

You know I’m going to show you how to do it without a plugin, right?

Ready to backup your functions.php again? Make sure you do because it’s always the time you don’t make a backup that something goes wrong.

The first thing you need to do is add this code to your functions.php.

function exclude_cat_wps($query) {
    if ($query->is_feed) {
        $query->set('cat','-20,-21,-22');
    }
    return $query;
}
add_filter('pre_get_posts','exclude_cat_wps');

Once you’ve done that, you need to go back and update the cat—category—IDs.

To find your ID’s head to your WordPress dashboard and find Categories. From there, hover over any category you want to exclude and look down at the bottom of your screen. There will be a long URL and it will have your category ID embedded in it. Do this for each category you want to exclude from your WordPress RSS feed.

RSS 
Feed Categories

The Final Wrap

You have awesome content to share, don’t you? Then it only makes sense for you to simplify how it’s served up to your most loyal readers. The ones who would gladly subscribe to your feed.

Now that you know exactly what to do, I encourage you to set up a customized WordPress RSS feed. And if this article helped you at all, please Tweet or Share it now!

If you have multiple WordPress websites to manage, our tool WPBlazer can help by streamlining tasks from a single dashboard.