Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

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

#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..?