WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm using custom post types in WordPress 3.0 (now 3.0.1) to setup a custom directory system, but can't seem to find how to list out the categories under the custom taxonomy similar to how you'd use the wp_list_categories for normal posts. Anyone know how you'd do this on a page? Thanks!

I've seen suggestions for options like the following, but have had no luck when popping them in there:

    //list terms in a given taxonomy using wp_list_categories  (also useful as a widget)
    $orderby = 'name';
    $show_count = 0; // 1 for yes, 0 for no
    $pad_counts = 0; // 1 for yes, 0 for no
    $hierarchical = 1; // 1 for yes, 0 for no
    $taxonomy = 'genre';
    $title = '';

    $args = array(
        'orderby' => $orderby,
        'show_count' => $show_count,
        'pad_counts' => $pad_counts,
        'hierarchical' => $hierarchical,
        'taxonomy' => $taxonomy,
        'title_li' => $title
<?php wp_list_categories($args); ?>
share|improve this question

migrated from stackoverflow.com Aug 28 '11 at 14:26

This question came from our site for professional and enthusiast programmers.

Are you sure you called register_taxonomy before you called wp_list_categories? register_taxonomy should be called in the init action hook, your template code (I assume you use it there) after that.

share|improve this answer

you have to post some content associated to your taxonomy[custom taxonomy] first! I used you code in my project and works like a charm!

share|improve this answer

If you need something more like ordering, filtering and pagination, see my post : http://geryit.com/blog/2011/03/wordpress-custom-post-types/

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.