1

I'm using wp_list_categories like this:

                                    $taxonomy     = 'colors';
                                    $orderby      = 'count';
                                    $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
                                    $title        = '';
                                    $empty        = 0;
                                    $number       = 1;
                                    $style        = 'list';

                                    $args = array(
                                      'taxonomy'     => $taxonomy,
                                      'orderby'      => $orderby,
                                      'show_count'   => $show_count,
                                      'pad_counts'   => $pad_counts,
                                      'hierarchical' => $hierarchical,
                                      'title_li'     => $title,
                                      'hide_empty'   => $empty,
                                      'number'       => $number,
                                      'style'        => $style
                                    ); ?>


                                    <ul class="tax-ul">
                                        <li class="tax-header">Colors</li>
                                    </ul>
                                    <ul class="list-cats">
                                        <?php wp_list_categories( $args ); ?>
                                    </ul>

...but I have more than one taxonomy that I want to list.

What is the best way to do this?

Thank you.

2

If you turn $taxonomy into an array:

$taxonomy     = array('colors','additional-taxonomy', 'another-taxonomy', 'etc');

You should be set

1
  • Thanks but doesn't work. – jw60660 Mar 14 '12 at 22:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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