Home › Forums › Back End › Display custom taxonomy (like “the_category”) for custom post type › Re: Display custom taxonomy (like “the_category”) for custom post type
November 29, 2011 at 9:26 am
#91492
jonedwards
Participant
Thanks for the nudge in the right direction, Rob.
I used the following:
<h4><?php $terms = get_terms("sectors"); $count = count($terms); if ( $count > 0 ){ foreach ( $terms as $term ) { echo $term->name; } } ?> Sector</h4>
It seems to work.
As this is a “client” website, and they usually screw everything up when editing, I’d prefer to be able to limit the number of terms outputted to 1. Any help..?