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 Exclude Specific Categories from WordPress RSS Feed

Editorial Note: We earn a commission from partner links on WPBeginner. Commissions do not affect our editors' opinions or evaluations. Learn more about Editorial Process.

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.

How to Exclude Specific Categories from WordPress RSS 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 more general 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 to add code snippets without 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 with the IDs of the categories that you want to exclude. For more information, you may want to see our guide on how to find category IDs in WordPress.

To exclude multiple categories, you can use a comma-separated list. You can see this on Lines 3 and 11 in the image below.

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 the front page, RSS feeds, archive pages, and search results.

Simply check the box for the category in the ‘Exclude from Feeds?’ column to exclude it 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 your 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. 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

3 CommentsLeave a Reply

  1. Syed Balkhi says

    Hey WPBeginner readers,
    Did you know you can win exciting prizes by commenting on WPBeginner?
    Every month, our top blog commenters will win HUGE rewards, including premium WordPress plugin licenses and cash prizes.
    You can get more details about the contest from here.
    Start sharing your thoughts below to stand a chance to win!

  2. DEEn Adavize says

    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.