Home › Forums › Back End › Display custom taxonomy (like “the_category”) for custom post type › Reply To: Display custom taxonomy (like “the_category”) for custom post type
November 22, 2013 at 4:34 am
#156891
Duncan
Participant
CRACKED IT!
I have managed to get the code working, see following:
<?php $terms = get_the_terms( $post->ID , 'yourtaxonomyhere' );
foreach ( $terms as $term ) {
$term_link = get_term_link( $term, 'yourtaxonomyhere' );
if( is_wp_error( $term_link ) )
continue;
echo '<a href="' . $term_link . '">' . $term->name . '</a>';
}
?>