Almost all themes display categories (with its permalink) by default. I am looking for similar type of code to add in my theme. From where can I get it? To create custom taxonomies, I'm using More Taxonomies plugin.


The easiest way to list terms of custom taxonomy and display them would be to use

 <?php get_the_term_list( $id, $taxonomy, $before, $sep, $after ) ?> 

For example in the loop, my custom taxonomy is 'jobs' list as li

 <ul><?php echo get_the_term_list( $post->ID, 'jobs', '<li class="jobs_item">', ', ', '</li>' ) ?></ul>
  • I was able to display the items this way: <code><ul><?php echo get_the_term_list( $post->ID, 'jobs', '<li class="types_item">', '</li><li class="jobs_item">', '' ) ?></ul></code> – Diana Jan 1 '17 at 2:37

None of the code on this page worked, but the example from the wordpress site did:

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

I got it from http://codex.wordpress.org/Function_Reference/get_the_term_list

Hope it helps other lost souls who would like to display the current post taxonomies :)


Check this out. it worked for me. i have a taxonomy named 'stores', and i wanted to display 2 taxonmies from it.

    $taxonomy = 'stores';
        'include'=> array(12,30)

    $terms = get_terms('stores',$args1 );
    echo '<ul>';

    foreach ($terms as $term) {
        //Always check if it's an error before continuing. get_term_link() can be finicky sometimes
        $term_link = get_term_link( $term, 'stores' );
        if( is_wp_error( $term_link ) )
        //We successfully got a link. Print it out.

        echo '<li><a href="' . $term_link . '">' . $term->name . '</a></li>';
    echo '</ul>';

protected by fuxia Feb 18 '15 at 5:51

Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).

Would you like to answer one of these unanswered questions instead?

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