I need to remove 9 categories from my feed, however none of the options I've found work.
if(empty($_SERVER['QUERY_STRING']) || (isset($_GET['feed']) && !(isset($_GET['cat']) || isset($_GET['category_name'])))) {
$cat=-1;
}
function myFilter($query) {
if ($query->is_feed) {
$query->set('cat','-99');
}
return $query;
}
add_filter('pre_get_posts','myFilter');
I've also tried two plugins (which I really don't want to use plugisn to begin with)...