Is there a way to exclude a taxonomy term from a Loop? For example, I have a tag named ‘hidden’. When displaying the loop I want to show everything except the posts with that tag.
I just realized that you didn’t specify what type of loop you’re using. If you’re using a post loop, you could use exclude_tag
or exclude_category
.
Yes, a post loop. Will this work with a custom taxonomy? It’s for learndash (ld_course_tag)
Sorry, didn’t think to include that information
1 Like
Ah, good point about custom taxonomies. For that, you’d probably want to use the taxonomy
, taxonomy_compare
, and terms
attributes. There are a couple of examples in the docs, but in your case it’d be something like this (I forget what LD calls their post type):
<Loop type=course taxonomy=ld_course_tag taxonomy_compare=not terms=hidden>
1 Like
Perfect! Thank you so much for you help!!
1 Like