Languages: English • Italiano • 日本語 (Add your language)
Check if the current post has any of the given terms.
The given terms are checked against the post's terms' term_ids, names, and slugs. Terms given as integers will only be checked against the post's terms' term_ids.
If no terms are given, determines if post has any terms.
<?php has_term( $term, $taxonomy, $post ) ?>
if( has_term( 'jazz', 'genre' ) ) { // do something }
Since: 3.1.0
has_term() is located in /wp-includes/category-template.php
.