I have a single-events.php and in there i want to show the tags on that post.

I have tried using this but nothing comes up.

I have put it within the loop but still nothing.

This is my code

<?php while ( have_posts() ) : the_post(); ?>   
<?php get_template_part( 'content', 'single' ); ?>
<?php the_tags(); ?>
<?php endwhile; // end of the loop. ?>

Am i missing something?

  • is it the default post_tags and not a custom taxonomy?
    – Milo
    Nov 20, 2012 at 16:11
  • Please post your register_post_type() code as well. We need to know what taxonomies your CPT supports. Nov 20, 2012 at 19:47

1 Answer 1


You cant display tags on a custom post type if that custom post type doesn't have tags registered. By default the Tags taxonomy is assigned to posts, you will need to register your post type accordingly.

To do so, use the taxonomies parameter:


(array) (optional) An array of registered taxonomies like category or post_tag that will be used with this post type. This can be used in lieu of calling register_taxonomy_for_object_type() directly. Custom taxonomies still need to be registered with register_taxonomy().

Default: no taxonomies


  • if the cpt didn't have tags registered, they wouldn't have been able to associate terms with the post that they're now expecting to see on a single cpt page, so it doesn't entirely make sense that this would be the issue
    – Milo
    Nov 20, 2012 at 17:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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