KyleNumann
8/6/2012 - 8:48 PM

Custom taxonomy terms for current post Wordpress

Custom taxonomy terms for current post Wordpress

// all you need to replace is 'your_taxonomy_name'
global $post;// required when using inside wp_query
$terms = wp_get_post_terms($post->ID,'your_taxonomy_name');
$count = count($terms);
if ( $count > 0 ){
echo "<ul>";
foreach ( $terms as $term ) {
echo '<li><a href="'.get_term_link($term->slug, 'your_taxonomy_name').'">'. $term->name . "</a></li>";
}
echo "</ul>";
}?> !!!!