add_filter('pre_get_posts', 'exclude_category');
function exclude_category($query) {
if ( $query->is_feed ) {
$query->set('cat', '-1');
}
return $query;
}
By
add_filter('pre_get_posts', 'exclude_category');
function exclude_category($query) {
if ( $query->is_feed ) {
$query->set('cat', '-1');
}
return $query;
}