Beginner's Guide for WordPress / Start your WordPress Blog in minutes

How to Make a Separate RSS Feed for Each Category in WordPress

Do you want to make a separate RSS feed for each category in WordPress?

Categories allow you to easily sort your content into major sections. Adding category RSS feeds can help your users subscribe to specific areas of your website that interest them.

In this article, we will show you how to easily make a separate RSS feed for each category in WordPress. We’ll also talk about how you can use them effectively to grow your website.

Making RSS feeds for categories in WordPress

Locating RSS Feed for Categories in WordPress

Categories and tags are two of the main default taxonomies in WordPress. They allow you to easily sort and organize your content into different subjects and topics.

By default, each category on your WordPress website has its own RSS feed. You can locate this RSS feed by simply adding ‘feed’ at the end of the category page URL.

For instance, if you had a category called ‘News’ with a URL like this:

https://example.com/category/news/

Then its RSS feed would be located at the following URL:

https://example.com/category/news/feed/

Tip: You can find your category URL by visiting Posts » Categories page and clicking on the View link below a category.

View category URL

Display Your Category RSS Feed Links in WordPress

Now that you have located the RSS feed URLs for your categories, let’s take a look at some of the ways that you can share them with visitors on your WordPress website.

1. Add Links to Category RSS Feeds in WordPress

The easiest way to point users to a category RSS feed is by adding a link to the category feed.

You can simply edit a post or page and add a plain text link anywhere you want.

Manually adding link to a category RSS feed in WordPress

You can use this method to manually create a list of links to all your category RSS feeds.

However, what if you add, delete, or merge categories in the future, then you will have to manually update that list.

Wouldn’t it be nice if you can show a dynamic list of category RSS feeds that is automatically updated? Next we’ll show you how to do just that.

2. Manually Display a List of Category Feeds

This next method allows you to display a list of categories with links to the category-specific RSS feed. Best of all, the list will update automatically if you add or remove a category on your site.

For this method, you’ll need to add some custom code to your WordPress website. If you haven’t done this before, then take a look at our guide on how to easily add custom code snippets in WordPress.

First, you need to find an image that you want to use as the RSS feed icon. For this tutorial, we are using the RSS feed icon that is 32×32 pixels in dimensions.

After that, you need to upload that image to your website. Simply go to Media » Add New page to upload your image and then click on the ‘Copy URL to Clipboard’ button.

Copy feed image URL

Now paste this image URL in a plain text editor like Notepad or TextEdit. You’ll need it in the next step.

After that, you need to paste the following code to your theme’s functions.php file or a site-specific plugin.

function wpbeginner_cat_feed_list() { 
$string .=  '<ul>'; 
$string .= wp_list_categories( array(
        'orderby'    => 'name',
        'show_count' => true,
        'feed_image' => '/path/to/feed-image.png'
        'echo' =>
    ) );     
$string .= '</ul>'; 
return $string; 
}
$add_shortcode('wpb-cat-feeds', 'wpbeginner_cat_feed_list' );

You will need to replace the ‘/path/to/feed-image.png’ with the URL of the feed icon image you copied earlier.

Now you can use the [wpb-cat-feeds] shortcode anywhere on your WordPress website to display the list of categories with the RSS feed icon next to each category.

Category list with RSS feed subscription icon

3. Show RSS Feed Subscription Option on Category Pages (Advanced)

Normally, WordPress category archive pages don’t have an option to subscribe. You can easily change that by adding a link to the RSS feed subscription on each category page.

To do that, you’ll need to make changes to your WordPress template files. Simply add the following code to the category.php or archive.php template in your WordPress theme.

<?php 		
if ( is_category() ) { 
$category = get_category( get_query_var('cat') );
if ( ! empty( $category ) )
echo '<div class="category-feed"><p><a href="' . get_category_feed_link( $category->cat_ID ) . '" title="Subscribe to this category" rel="nofollow">Subscribe</a></p></div>';
}
?>

After you save your changes, you can visit any category page to see the subscribe link in action.

RSS feed subscribe link on category page

Tip: Need help finding out which file to edit in your WordPress theme? See our complete WordPress template hierarchy cheat sheet for beginners to figure this out.

How to Take Advantage of Category RSS Feeds in WordPress

Category RSS feeds allow your users to subscribe only to areas that interest them the most.

For instance, if you have a technology news blog, then your users can choose to subscribe only to news about the devices that they use.

However, a plain RSS feed isn’t readable without a feed reader. And nowadays, most users don’t use a feed reader to subscribe to their favorite websites.

This is where it gets tricky. How do you use your category RSS feeds if your users don’t use feed readers?

Luckily, you can use your category feeds to deliver content to your users anywhere they want.

For instance, you can ask users to sign up for your email newsletter with an option to get updates only for specific categories.

With an email marketing service like Constant Contact, Sendinblue, and others, you can easily set up an automated RSS-to-email newsletter only for specific categories. See our guide on how to notify subscribers of new posts for step-by-step instructions.

Similarly, you can also allow users to get instant push notifications for each category using PushEngage. It is the best push notification service on the market and allows you to send messages directly to your users’ devices (desktop as well as mobile phones).

PushEngage allows you to set up automatic push notifications using RSS feeds. You can simply enter your category RSS feed URL, and a push notification will go out whenever a new post is published in that category.

We hope this article helped you learn how to make separate RSS feed for each category in WordPress. You may also want to see these easy tips to grow your blog traffic or take a look at our comparison of the best live chat software for small business.

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.

Disclosure: Our content is reader-supported. This means if you click on some of our links, then we may earn a commission. See how WPBeginner is funded, why it matters, and how you can support us.

The Ultimate WordPress Toolkit

Get FREE access to our toolkit – a collection of WordPress related products and resources that every professional should have!

Reader Interactions

24 CommentsLeave a Reply

  1. Thanks for this awesome post.

    Hey, how do you deal with:
    1. Categories with two words (eg The Category). Is it /category/the-category/feed/ ?
    2. Multiple categories (eg Category 1 and Category 2)?

  2. How to make RSS feed links to show full posts? I mean without the read more or continue reading tag, that redirects the readers to the original website. it would good if you suggest a way without using a plugin.

  3. Is it possible when you have a general RSS feed and somehow split them so each feed item goes into the correct category?

  4. Hi, and what if i have list of blog categories, displayed as a wp menu?

    Can i add RSS icon after each link to subscribe that category?

    How can i do that? It will be very nice, if youser don’t need to look
    enywhere else.

    • Another question: how to exclude category with id 227 from this list, i try:
      . ‘exclude=227’ before/after link, without results

  5. How are you able to do this for woocommerce’s categories also if you can tell me where to put it

    Thanks

  6. -Need our own RSS Feed.
    I believe this is self-explanatory.
    -Need to register with all search engines.
    Self-explanatory.
    want ot creat own RSS feed…..
    any one give the solution

  7. I’m not sure what the following means:
    Instead what you can do is use this code:

    You can paste this code in your sidebar where you have the category code.
    I can’t see the category code in the sidebar. I’m probably looking in the wrong place!

  8. i was actually looking for this. Searched all over the internet and you tube but couldn’t find proper info regarding RSS. Thanx man u really saved my day…

  9. Your “Sign me up for the newsletter” option at the end of a comment is really cool, how do you do it? I would like to add it on my WordPress website too.

    Thanks!

    Mj

  10. Hi

    Thank you, the feed per category link works.

    It shows the xml file, what do I need to do for it to look like in a browser?

    Many thanks,

    Mj

  11. i just want to do like yours (as your side bar suscribe section) i will be glad if you explain me because i couldn’t undertand :S

  12. Hello. I was really interested by this but I was wondering where this went? On my blog I have the categories section in the sidebar, on my friends blog which I set up the categories menu is a dropdown at the top and putting a categories in the sidebar looks un-neat. I was wondering if there was a way to display a link saying ‘Subscribe to RSS’ leading to something like http://rmagic.yui-dev.co.cc/uncategorized/feed/ which would then lead to feedburner. Is it possible? Thank you for all your great tutorials, I have used many of them on my blogs and they are running perfectly well!

Leave A 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.