Created
May 6, 2013 17:51
-
-
Save spearsmarketing/5526772 to your computer and use it in GitHub Desktop.
Code to remove WordPress category from RSS feed. Add to functions.php
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
add_filter('pre_get_posts','custom_feed_filter'); | |
function custom_feed_filter($query) { | |
if( $query->is_feed ) | |
$query->set('cat','-8'); | |
return $query; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment