Created
March 22, 2013 05:16
-
-
Save spencejs/5219106 to your computer and use it in GitHub Desktop.
Exclude Categories From The Feed In Wordpress
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //Exclude Categories From The Feed | |
| function myFeedExcluder($query) { | |
| if ($query->is_feed) { | |
| $query->set('cat','-178,-9'); | |
| } | |
| return $query; | |
| } | |
| add_filter('pre_get_posts','myFeedExcluder'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment