Return to Snippet

Revision: 41300
at February 15, 2011 22:46 by PubliOne


Initial Code
<?php 
function has_term($term_name, $taxonomy_name) {
	$terms = get_terms($taxonomy_name, 'fields=names');
	for ($i=0; $i < count($terms); $i++) {
		if ($terms[$i] == $term_name) {
			return true;
		}
	} return false;
} 
?>

Initial URL

                                

Initial Description

                                

Initial Title
has_term() function

Initial Tags
wordpress, function

Initial Language
PHP