/ Published in: PHP
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
<?php function has_term($term_name, $taxonomy_name) { $terms = get_terms($taxonomy_name, 'fields=names'); if ($terms[$i] == $term_name) { return true; } } return false; } ?>