Created
January 25, 2018 19:25
-
-
Save rwdevpixelparlor/ae7bd97b0946d0196d4a4c76ee8ef2b5 to your computer and use it in GitHub Desktop.
This file contains 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
<?php | |
function exclude_category($query) { | |
if ( $query->is_feed ) { | |
$query->set('cat', '-5, -2, -3'); | |
} | |
return $query; | |
} | |
add_filter('pre_get_posts', 'exclude_category'); | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment