Ready to get started?Download WordPress


Custom Post Type UI
[resolved] Displaying Custom Taxonomies (3 posts)

  1. Chris
    Posted 10 months ago #

    Hi all

    I've installed the plugin and have thus far created a Custom Taxonomy that lets say I've called "Celebrity".

    When I create a new post, the "Celebrity" box appears and lets me select or create new taxonomies. The Custom Rewrite Slug for terms work fine (e.g. mysite.com/celebrity/madonna). My only question is - how do I get a list of Custom Taxonomies related to the post to appear in the post?

    i.e. Something at the bottom of the article similar to This post features <Madonna - or whatever is in Celebrity Custom Taxonomy>. This way, by clicking on Madonna, the user is sent to all posts with this Taxonomy.

    Any help would be much appreciated.


  2. Michael Beckwith
    Plugin Author

    Posted 10 months ago #

    You'll have to roll your own custom little setup within your theme's loop. A couple helpful functions, linked below, are get_terms() and get_term_link. If you check out the examples in both, you should be able to piece together a solution. I you can't do this via the template files, or you wish to have this done via the post editor, you could set up a shortcode to display the content as well.


  3. Chris
    Posted 10 months ago #

    Many thanks for the reply. Managed to get it working using;

    <?php echo get_the_term_list( $post->ID, 'celebrity', 'Celebrity: ', ', ', '' ); ?>


You must log in to post.

About this Plugin

About this Topic