0

I have a custom taxonomy (toolkit-sections) inside a custom post type (toolkit-tools) and I'm looking to just list the taxonomy names and descriptions from toolkit-sections on a homepage.

I don't want to list any posts from inside these taxonomies, I just want to show what the taxonomies are called and what their descriptions are.

Do you know how to do this? I really, really would appreciate any help!

1 Answer 1

0

You can use get_terms.

In your case, something like this ought to get you started:

$term_list = get_terms( 'taxonomy_name', 'hide_empty=0&orderby=name' );

foreach( $term_list as $term ) {
    echo "<li>" . $term->name . $term->description . "</li>";
}
1
  • Excellent! Many thanks Gwendydd - I think when I had been trying to do this myself at midnight last night I was forgetting about the hide-empty! I'm so grateful for your help here.
    – Adam
    Commented Apr 23, 2015 at 6:23

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.