WordPress.org

Ready to get started?Download WordPress

Forums

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

  1. Chris
    Member
    Posted 1 year 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.

    http://wordpress.org/extend/plugins/custom-post-type-ui/

  2. Michael Beckwith
    Member
    Plugin Author

    Posted 1 year 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.

    http://codex.wordpress.org/Function_Reference/get_terms
    http://codex.wordpress.org/Function_Reference/get_term_link

  3. Chris
    Member
    Posted 1 year ago #

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

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

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic