Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I have a custom post type; posts of this type can have either one or two categories associated with them. I need to display the names of the categories that are associated with each of these custom posts within the loop. Is there a way to do this?

share|improve this question

1 Answer 1

up vote 1 down vote accepted

Assuming you have added the category taxonomy to your Custom Post Type, you can simply call the_category().

Alternately, if you're using a custom taxonomy, you can echo the results of get_the_terms( $id, $taxonomy ).

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.