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

How can I display the type of custom post type in a template?

So: <h3> [CUSTOM POST TYPE] </h3>?

share|improve this question

Already figured it out:

<?php $post_type = get_post_type_object( get_post_type($post->ID) );?>
<h3><?php echo $post_type->label ?></h3>
share|improve this answer
$post->post_type no need to use get_post_type() here as you already have the post object :) – Sisir Jul 8 '12 at 18:12

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.