Equivalent to in_category() for custom taxonomy
Hello fellow WP users and developers.
I am having a tough time with something and hoping someone has an answer. I need an equivalent to the WP conditional in_category().
I have a query that is pulling from a custom taxonomy. Using the more general examples, let’s say that taxonomy is Movies. The terms would be “Action”, “Drama” and “Comedy”
I need something that will check to see if the post is within the term “Drama”.
As I understand Categories, “Category” is a taxonomy and the specific defined categories are “terms” within that category. Using the in_category() allows you to see if the post is within one of the defined terms of the taxonomy “Category”.
I need something that will do the same for my custom taxonomies. Anyone have a solution for this?
- The topic ‘Equivalent to in_category() for custom taxonomy’ is closed to new replies.