Exclude category from RSS in Wordpress

1
2
function myFeedExcluder($query) {
if ($query->is_feed) {
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
How to exclude a category from the standard RSS-feed in Wordpress. Add this snippet in the themes function.php-file.

Add more categories by adding IDs. Ex: -12,-13,-14

1 Response

Very useful for posting sponsored reviews or press releases which is not useful for subscribed readers.

Write a comment

You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.