Trusted WordPress tutorials, when you need them most.
Beginner’s Guide to WordPress
WPB Cup
25 Million+
Websites using our plugins
16+
Years of WordPress experience
3000+
WordPress tutorials
by experts

How to Make Separate RSS Feeds 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 users subscribe to specific areas of your website that interest them and boost SEO.

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

How to make separate RSS feeds for each category in WordPress

How to Find RSS Feeds for Different 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 (Really Simple Syndication). You can easily locate it by simply adding ‘feed’ at the end of the category page URL.

For instance, if you have a category called ‘News’ on your WordPress site, then its URL will look like this:

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

Similarly, 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 the Posts » Categories page and clicking on the ‘View’ link under a category.

View Category URL by clicking on the View link

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

If you want to add links to your category RSS feeds using the default WordPress settings, then this method is for you.

First, you will need to open up a page or post where you want to add the RSS feed links in the block editor.

Once there, you can type the names of all the categories on your website in a List block.

After that, click the ‘Link’ icon in the block toolbar to open up the link prompt.

Click the Link icon in the block toolbar

Here, you can type the URL for your category RSS feed.

You will need to repeat this process for each category RSS feed on your website by linking it to the related name within the List block.

Add category RSS feed links

Once you are done, don’t forget to click the ‘Publish’ or ‘Update’ button to save your changes.

You have now manually created a list of links to all your category RSS feeds. You can visit your website to see these WordPress RSS feed links in action.

Category RSS feed preview

However, keep in mind that if you want to add, delete, or merge categories in the future, then you will have to manually update this list again.

Method 2: Add Links for Category RSS Feeds Using WPCode (Recommended)

If you want to create a list of category RSS feed links that are automatically updated every time you make changes, then this method is for you.

To add URLs to the category RSS feed, you must add custom code to your website theme’s functions.php file. However, even the smallest error in the code can break your site, making it inaccessible.

We recommend always using WPCode when adding custom code to your website. It is the best WordPress code snippet plugin that makes it safe and easy to add custom code without manually editing your functions.php file.

First, you need to install and activate the WPCode plugin. For more instructions, see our guide on how to install a WordPress plugin.

Note: You can also use the free WPCode plugin for this tutorial. However, upgrading to the pro version will give you access to a cloud library of code snippets, smart conditional logic, and more.

Upon activation, head over to the Code Snippets » + Add Snippet page from the WordPress admin sidebar.

Next, click on the ‘Use Snippet’ button under the ‘Add Your Custom Code (New Snippet)’ option.

Add new snippet

This will take you to the ‘Create Custom Snippet’ page, where you can start by typing a name for your code snippet. This name is only for your identification and won’t be used on the website’s front end.

Next, select ‘PHP Snippet’ as the Code Type from the dropdown menu on the right side of the screen.

Choose PHP Snippet as code type for category RSS feed

After that, copy and paste the following code into the ‘Code Preview’ box:

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' => false,
	) );
	$string .= '</ul>';

	return $string;
}

add_shortcode( 'wpb-cat-feeds', 'wpbeginner_cat_feed_list' );

Once you have done that, you can also choose an icon image that will be displayed next to your category RSS feed links.

To do this, simply replace the /path/to/feed-image.png line in the code with the URL of your preferred icon image for the feed links.

Paste the code for adding links for category RSS feeds

Keep in mind that the icon image will first need to be uploaded to your WordPress media library.

Once it’s uploaded, you can get its URL by visiting the Media » Library page from the admin sidebar and clicking on the icon image to view its attachment details.

Copy image link from the media library

After adding the URL for the icon image to the code, scroll down to the ‘Insertion’ section.

From here, select the ‘Auto Insert’ method to automatically execute the code on the website page where you add a shortcode.

Note: Keep in mind that even after choosing the ‘Auto Insert’ mode, you will need to add a [wpb-cat-feeds] shortcode to the page where you want to list categories RSS feeds. This shortcode is not the WPCode ‘Shortcode’ feature but a part of the code snippet itself.

Choose an insertion method

Next, scroll back to the top and toggle the ‘Inactive’ switch to ‘Active’.

Finally, click the ‘Save Snippet’ button to store your settings.

Save the code snippet for adding RSS feed links to categories

After that, open up the page/post where you want to add the category RSS feed links in your WordPress block editor.

From here, click the add block ‘+’ button in the top left corner of the screen and locate the Shortcode block.

Upon adding the block, simply copy and paste the following shortcode into it.

[wpb-cat-feeds]

Add shortcode

Finally, click the ‘Update’ or ‘Publish’ button to save your changes.

Now, visit your website to check the category RSS feed links in action.

Preview for category RSS feeds

Method 3: Display RSS Feed Subscription Option on the Category Pages

If you want to add a Subscribe link at the top of all the category pages on your WordPress blog, then you can use this method.

To do this, you will need to add custom code to your WordPress category.php or archive.php theme template.

However, it can be risky, and the smallest error can break your website.

This is why we recommend using WPCode instead. It is the easiest and safest way to add custom code to your WordPress website.

First, you need to install and activate the WPCode plugin. For more instructions, please see our step-by-step guide on how to install a WordPress plugin.

Upon activation, visit the Code Snippets » + Add Snippet page from the WordPress dashboard.

Next, head over to the ‘Add Your Custom Code (New Snippet)’ option and click the ‘Use Snippet’ button under it.

Add new snippet

Once you are taken to the ‘Create Custom Snippet’ page, start by typing a name for your code snippet. It can be anything you like and is only for your identification purposes.

After that, select ‘PHP Snippet’ as the Code Type from the dropdown menu on the right.

Choose PHP code type for code snippet to add subscription links to category pages

Next, simply copy and paste the following code into the ‘Code Preview’ box:

<?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>';
}
?>

Upon adding the code, scroll down to the ‘Insertion’ section and choose the ‘Auto Insert’ method.

This way, the code will automatically be executed on your website.

Choose an insertion method

Next, open the ‘Location’ dropdown menu and switch to the ‘Page-Specific’ tab from the column on the left.

After that, select the ‘Insert Before Excerpt’ option as the snippet location.

Choose snippet location as Insert before excerpt

Once you have done that, scroll back to the top and toggle the ‘Inactive’ switch to ‘Active’.

Finally, click the ‘Save Snippet’ button to save your changes.

Save snippet for adding subscription link to category pages

Now, you can visit your website category page to view the Subscription link for the RSS feeds in action.

This is what it looked like on our demo website.

Preview for subscription link

Bonus: Optimize Category RSS Feeds in WordPress

Category RSS feeds allow your users to subscribe only to content that interests 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 most users aren’t using one to subscribe to their favorite websites.

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

For example, you can ask users to sign up for your email newsletter and choose to receive updates only for specific content categories.

With email marketing services like Constant Contact or Brevo (formerly Sendinblue), you can easily set up an automated RSS-to-email newsletter for specific categories.

You can 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 that allows you to send messages directly to your users’ devices (desktops as well as mobile phones).

PushEngage

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

For more details, see our guide on how to send push notifications in WordPress.

We hope this article helped you learn how to make separate RSS feeds for each category in WordPress. You may also want to see our guide on how to add custom post types to your WordPress RSS feed or our expert pick of the best WordPress RSS feed plugins.

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. Here's our editorial process.

Editorial Staff

Editorial Staff at WPBeginner is a team of WordPress experts led by Syed Balkhi with over 16 years of experience in WordPress, Web Hosting, eCommerce, SEO, and Marketing. Started in 2009, WPBeginner is now the largest free WordPress resource site in the industry and is often referred to as the Wikipedia for WordPress.

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

27 CommentsLeave a Reply

  1. Samuel

    Wow! Great article!, This is a highly beneficial, I never knew that each categories is hiding their feeds in their links. Thanks for revealing this. I learned a new thing today. I would also like to add that sharing your categories feed link on all your social handles is one of the best way to attract visitors to your site.

  2. Ralph

    What if the post has 2 categories? Will it send it to both RSS feeds or only to primary category?
    I have articles that can go to 2 or 3 categories at the same time.

    • WPBeginner Support

      The post should be in both RSS feeds.

      Admin

  3. Gavin

    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)?

  4. Adithya Shetty

    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.

  5. Peter Keijzer

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

  6. Gabrielle

    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.

    • Gabrielle

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

  7. Jaime

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

    Thanks

  8. shahzad

    -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

  9. Ron Reid

    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!

  10. Mujeeb

    GREAT SOLUTION….

    THANKS.

  11. varun

    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…

  12. Maria José

    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

  13. Maria José

    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

  14. burak

    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

  15. Shelley

    When I add “feed” to the end of the url of the category I want a feed for (https://www.wpbeginner.com/category/showcase/feed/), it just takes me to the full feed of my entire blog with all posts rather than just those in the category I specified. Is there a setting I need to change that you can help me with?

    • Editorial Staff

      We are redirecting all feeds to our main feeds. But on normal sites, that feature should work fine.

      Admin

  16. HelyRojas

    Excelente, y yo buscando plugins para algo que wordpress hace por defecto. Thanks

  17. milest

    Thank You for this tip!

  18. Mark in Tallinn

    I’m actually looking for a way to add cat feeds to header for autodiscovery… must be a plugin for that?!

  19. Yui

    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!

    • Editorial Staff

      There is not a plugin for redirecting the category feeds to feedburner category feeds, but there is a method that lists categories and each category feed. Check it out here.

      Admin

  20. DaveK

    Thats very handy to know, will be useful on an upcoming project I have. Thanks.

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.