Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

Why doesn't it shows terms in both 'lunch' and 'dinner' taxonomies?
How can i do it?

  <?php 
    $taxonomy     = array('lunch', 'dinner');
    $orderby      = 'name'; 
    $hierarchical = 1; 
    $title        = '';

    $args = array(
      'taxonomy'     => $taxonomy,
      'orderby'      => $orderby,  
      'hierarchical' => $hierarchical,
      'title_li'     => $title
    );
    ?>

    <ul>
    <?php wp_list_categories( $args ); ?>
    </ul> 
share|improve this question

1 Answer 1

up vote 0 down vote accepted

Have you noticed in the list all of valid Parameters for wp_list_categories() function that taxonomy doesn't accept input as array, thats why you are not supposed to pass an array to it.

If you still want to be able to show terms of two different taxonomies, use get_terms() Wordpress function instead. The only bad is it won't provide pre-formatted list of Term Objects and their children, instaed it provides array.

share|improve this answer

Your Answer

 
discard

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

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