How to display category information from a custom post

To get the taxonomy term for this particular post, then what you need is wp_get_post_terms($post->ID, 'yourtaxonomyname')

This will return an array of terms in the specified taxonomy for the post specified. The codex page is: http://codex.wordpress.org/Function_Reference/wp_get_post_terms

If you’re after a specific term in a taxonomy get_term($taxonomy_name, $term_id). You can also get all terms for a taxonomy using get_terms()

Here’s an example of how to use it.

$terms = wp_get_post_terms($post->ID,'toolkit');  
foreach ($terms as $term) {  
    echo $term->description;  
}  

Leave a Comment