[resolved] Remove certain categories from site RSS feed (5 posts)

  1. RichardSapien
    Posted 5 years ago #


    I've done some research but I can't seem to find what I'm looking for. I would like to prevent posts from a specific category from appearing on the site's RSS feed.

    Is this doable? Any hacks/plug-ins? I appreciate your help.


  2. This plugin's comments includes a way to deal with categories in feeds. Looks like you could tweak your feed without the plugin, too.

  3. Arnold Goodway
    Posted 5 years ago #

    You will need to place something like this in your functions.php file:

    function myFilter($query) {
        if ($query->is_feed) {
    return $query;

    The number 99 refers to the index of the category you want to exclude from the feed. Do not forget to add the minus before the number you are going to put in here.

    Hope this helps.

  4. RichardSapien
    Posted 5 years ago #

    Great suggestions, I got it working. I really appreciate your help guys.

  5. DoZ
    Posted 5 years ago #

Topic Closed

This topic has been closed to new replies.

About this Topic