Latest Tech and Tips

How to Exclude Specific Categories from WordPress RSS Feed

7

Do you desire to exclude specific categories from RSS feed upon your WordPress website? Many website proprietors utilize some categories for material that they do not desire to show up in the RSS feed of their website. In this short article, we will certainly reveal you how to exclude specific categories from WordPress RSS feed.

exclude category exclude specific category RSS feed feed

Method 1: Exclude Specific Categories from WordPress RSS Feed Using Plugin

First point you require to do is mount and also turn on the Ultimate Category Excluder plugin. For even more information, see our detailed overview on how to mount a WordPress plugin.

Upon activation you require to browse through Settings” Category Exclusion to set up plugin setups.

Category excluder

The setups web page will certainly present all categories on your WordPress blog site with choices to conceal them from front web page, RSS feeds, archive web pages, and also search engine result.

Simply choose the exclude from feed box following to the categories that you desire to exclude from your RSS feed.

Don’ t fail to remember to click upgrade switch to conserve your setups.

That’s all, articles submitted under your chosen categories will certainly vanish from your WordPress RSS feed.

Method 2: Manually Exclude Specific Categories from WordPress RSS Feed

This technique needs you to paste code in your WordPress documents. You can utilize this technique if you fit with pasting code fragments from internet right intoWordPress

You demand to include this code to your motif’s functions.php documents or a site-specific plugin.

feature exclude_category($ query) {
if ($ query->> is_feed) {
$ query->> collection(' feline', '-5, -2, -3');.
}
return $query;.
}
add_filter(' pre_get_posts', 'exclude_category');.

This code just leaves out categories that match the offered IDs. Simply change the classification IDs in the code with the IDs of categories that you desire to exclude.

See our overview on how to discover classification IDs inWordPress

If you simply desire to exclude a solitary classification, after that alter the code similar to this:

feature exclude_category($ query) {
if ($ query->> is_feed) {
$ query->> collection(' feline', '-15');.
}
return $query;.
}
add_filter(' pre_get_posts', 'exclude_category');.

Replace -15 with the ID of classification that you desire to exclude from RSS feed.

We wish this short article assisted you discover how to exclude specific categories from WordPress RSS feed. You might likewise desire to see our checklist of 10 most desired classification hacks and also plugins for WordPress.

If you liked this short article, after that please subscribe to our YouTube Channel for WordPress video clip tutorials. You can likewise discover us on Twitter and also Facebook.