Exclude Term from get the term list
-
On a custom post type, I’ve included a function that outputs the terms from a custom taxonomy for a specific post that looks like this:
<?php echo get_the_term_list( $post->ID, 'cooking-category', ' ', ', ', '' ); ?>
This is displayed with each post and it works perfectly, however some posts in this custom post type list more than one term such as: desserts, breakfast, sauces, etc…
I’m trying to find a way to exclude a term from “get the term list” so that if I want to exclude the term “sauces” I can exclude this from the the function. I know in a category list it is easy to exclude a category, but I’m not sure how to do this with taxonomy terms. Thanks for any help or direction.
- The topic ‘Exclude Term from get the term list’ is closed to new replies.