• Resolved David Gard

    (@duck_boy)


    Hey all,

    I have created a custom taxonomy, and I am able to list the tags from that taxonomy, but can anyone tell me how to print the description?

    Thanks

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter David Gard

    (@duck_boy)

    Please ignore, just found another topic about this.

    Thanks.

    Thread Starter David Gard

    (@duck_boy)

    OK, sorry – What I found was how to list the descriptions of the custom terms associated with that post, but what I would like is just a list of description for those terms that exist within the custom taxonomy.

    Thanks.

    This works with category and post_tags so I believe it would work with a custom taxonomy

    <?php
    //list terms in taxonomy
    $types[0] = 'your_taxonomy_here';
    
    foreach ($types as $type) {
      $taxonomy = $type;
      $terms = get_terms( $taxonomy, '' );
      if ($terms) {
        foreach($terms as $term) {
            echo '<p>' . $term->name . '</p>';
        }
      }
    }
    ?>

    Thread Starter David Gard

    (@duck_boy)

    It does indeed work.

    Thanks muchly.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Get description from custom taxonomy’ is closed to new replies.