Home / functions.php / Exclude categories
  • How to Exclude categories

    no thumbnail sorry: Exclude categories

    Adding this PHP code to your wordpress functions.php file will allow you to exclude categories from your RSS feeds. Make sure to use a minus before the category id.

    ( click code to copy )

    wordpress snippet : PHP

    function excludeCat($query)
       if ($query->is_feed)
       return $query;

    ( WordPress codex functions, hooks, in this snippet. )

    query, get_post, get_posts, add_filter, is_feed,