Excluding specific categories from your WordPress RSS feed can give you more control over what content gets shared. It’s useful if you have certain posts that don’t fit your main feed, like private updates or announcements for a small audience.
This way, those posts stay on your site without being sent out to all your subscribers.
However, managing what appears in your RSS feed requires more than just a click of a button. It can feel a little tricky if you’re unfamiliar with WordPress settings.
That’s why we’ve done the research to find easy ways to exclude specific categories from the WordPress RSS feed. We found that WPCode and Ultimate Category Excluder offer the most straightforward approaches and are manageable even for beginners.
In this article, we’ll show you how to easily exclude specific categories from your WordPress site’s 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, the feed includes posts from all categories on your site, displayed in the order they were 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 of 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 2 ways:
Ready? Let’s get started.
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.
We only recommend directly editing your WordPress files if you’re an advanced user because even small mistakes can easily break your site.
For this tutorial, we will use 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.
Note: The WPCode free plugin includes the code snippet for excluding categories from RSS feeds. If you want to unlock more features, such as access to over 100 expert-approved code snippets, the Conversion Pixel addon, and full access controls, there’s a WPCode pro version starting at $49 per year.
If you want to learn more about this plugin, you can read our complete WPCode review.
Upon activation, you can simply head to Code Snippets » Add Snippet and search for ‘rss.’ This will show you a pre-configured snippet titled ‘Exclude Specific Categories from RSS Feed’ in the WPCode library.
While exploring the library, you might notice other snippets that may replace any number of dedicated, single-use plugins on your site.
Let’s hover over ‘Exclude Specific Categories from RSS Feed’ with your mouse and click the ‘Use Snippet’ button.
Next up, 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.
You can use a comma-separated list to exclude multiple categories. In the image below, this is shown on Lines 3 and 11.
Once you’ve chosen the categories to exclude from your WordPress RSS feed, toggle the switch to ‘Active’ and click 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 and then update the page.
Method 2: Exclude Specific Categories from RSS Using a Dedicated Plugin
For this method, we will use a dedicated plugin called Ultimate Category Excluder.
Expert Tip: Using dedicated plugins is great, as they do just what’s needed. However, do note that relying on too many of them can clutter or slow down your site.
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 head over to Settings » Category Exclusion to configure plugin settings.
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 ‘Update’ to save your settings.
That’s all. Posts filed under your selected categories will disappear from your WordPress RSS feed.
Bonus Tip: Show Content Only to RSS Subscribers in WordPress
Now that you’ve learned how to organize your WordPress RSS feed, why don’t we take it to another level?
Offering exclusive content to your RSS subscribers is a great way to boost your WordPress site. It gives readers a reason to subscribe so they don’t miss out on your latest updates. You could offer things like early access to podcasts or special giveaways.
Rewarding loyal readers keeps them coming back, which is especially helpful when building a new audience.
To learn more, you can check out our guide on how to show content only to RSS subscribers in WordPress.
We hope this article helped you learn how to exclude specific categories from your WordPress RSS feed. You may also want to see our guides on how to limit the number of posts in WordPress RSS feeds and how to completely customize your WordPress RSS feeds.
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.
Jiří Vaněk
The snippet works great. I have a tech blog, and one section contains my personal opinions, which I didn’t want in the RSS feed. It’s a niche category and doesn’t fit into the tech blog. I tried the snippet and used WP Code (a must-have plugin for me) to remove this category from the RSS feed. It works brilliantly. Thanks!
WPBeginner Support
You’re welcome!
Admin
Yogesh Rathdo
cool trick, thanks for sharing!
DEEn Adavize
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.