WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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
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


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.