WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is there a function that does something like:

is_in_taxonomy($term, $taxonomy)

Where it returns true if $taxonomy has that $term. ????


share|improve this question
up vote 2 down vote accepted

You're probably looking for term_exists():

<?php term_exists( $term, $taxonomy, $parent ); ?>

$term is required (obviously).

Both $taxonomy and $parent are optional, but if you want to determine if a specific taxonomy has a given term, just pass the registered taxonomy name via the $taxonomy parameter.

share|improve this answer


term_exists( $term, $taxonomy );
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.