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

How to Exclude Specific Categories from WordPress RSS Feed

Do you want to exclude specific categories from RSS feed on your WordPress site?

If you have content that you don’t want to appear in your main RSS feed, you can create specific categories to prevent them from showing up. They will still be on your site, but they won’t be pushed out through RSS.

In this article, we will show you how to exclude specific categories from your WordPress site’s RSS feed.

exclude category exclude specific category RSS feed feed

Why Exclude Specific Categories from Your RSS Feed?

All WordPress blogs have an RSS feed that updates when you publish a new post. By default, these display content from every category on the site in the order it’s published.

There could be any number of reasons you might want to exclude certain categories from that RSS feed. Maybe you run a site where you categorize posts for specific courses and don’t want those lumped in with blog posts.

Perhaps you don’t want News posts going out into your RSS feed over Features posts, or maybe your email list is connected to RSS and you publish a lot and don’t want to overwhelm your subscribers.

Whatever the reason, we can show you how to exclude specific categories from your WordPress RSS feed. In this tutorial, we will be doing this in two ways:

Method 1: Exclude Specific Categories from WordPress RSS Feed with WPCode

This method requires you to add code snippets to your WordPress theme’s functions.php file. Normally, we only recommend directly editing your own WordPress files if you’re an advanced user because even small mistakes can easily break your site.

For this tutorial, we will be using WPCode, the easiest and safest way for anyone add code snippets wihtout fear of breaking WordPress.

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

Upon activation, you can simply head to Code Snippets » Add Snippet and search for ‘rss.’ This will find a pre-configured snippet titled ‘Exclude Specific Categories from RSS Feed’ in the WPCode library.

Note that you can also find other snippets in the library that may replace any number of dedicated, single-use plugins you have on your site.

Hover over it with your mouse and click the ‘Use Snippet’ button.

Add a New Snippet using WPCode.

Next, you will see the ‘Edit Snippet’ page, where WPCode has already set up all the options you need to run the snippet.

All you have to do is replace the category IDs on Line 11 with the IDs of categories that you want to exclude. See our guide on how to find category IDs in WordPress.

To exclude multiple categories, you can use a comma separated list, as shown on Line 3 of the snippet.

Edit the category IDs in WPCode then activate the snippet.

Once you’ve chosen the categories to exclude from your WordPress RSS feed, toggle the switch to ‘Active’ and click on the ‘Update’ button.

Your chosen categories will now be excluded from your WordPress website‘s RSS feed.

If you want to include them in your RSS feed again, simply toggle the switch to ‘Inactive’ or remove the category ID from the snippet itself and then update the page.

Method 2: Exclude Specific Categories from RSS Using a Dedicated Plugin

For this method, we’re going to use the dedicated plugin, Ultimate Category Excluder.

The first thing you need to do is install and activate the plugin. For more details, see our step-by-step guide on how to install a WordPress plugin.

Upon activation, you need to visit Settings » Category Exclusion to configure plugin settings.

Category excluder

The settings page will display all categories on your WordPress blog with options to hide them from front page, RSS feeds, archive pages, and search results.

Simply select the exclude from feed box next to the categories that you want to exclude from your RSS feed. Don’t forget to click on the ‘Update’ button to save your settings.

That’s all, posts filed under your selected categories will disappear from your WordPress RSS feed.

We hope this article helped you learn how to exclude specific categories from WordPress RSS feed. You may also want to see our list of the 6 best drag-and-drop page builders for WordPress or how to allow file uploads on your WordPress site.

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

2 CommentsLeave a Reply

  1. Please, i’m ardent reader of your site. How can i re-order my feed post using category id?

    I want my feed posts to be arranged according to which category posts should come first. e.g

    World news (first)
    National news
    sports
    Style
    etc (last)

    Please, help me out.

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.