Use this to get the name of the custom taxonomy. Note that this only returns the name of the first selected item, but since this returns an array, use a foreach loop to find all names.
- // get name of manufacturer of this post
- // replace 'manufacturer' with the id name of your custom taxomony
- $manufacturer = wp_get_post_terms($post->ID, 'manufacturer');
- $manufacturer_name = $manufacturer->name;
- // use this to display the name
- echo $manufacturer_name;
You need to login to post a comment.