I'm looking for a way to exclude all posts within a term for a custom taxonomy from my RSS feed. I have a custom taxonomy called "filter" and a term in that taxonomy called "premium" which I'm looking to exclude from my RSS feed.
I've seen numerous places how to exclude posts from a term within a category but have yet to find how I can exclude posts from a term within a a custom taxonomy.
function excludecatfeed($query) {
if(is_feed()) {
$query->set('cat','-1');
return $query;
}
}
add_filter('pre_get_posts', 'excludecatfeed');
This is what I find all the time when searching for this but this is for category, I'm looking to do this same thing but for a custom taxonomy. Thanks