Is it possible to use wp_list_categories( $args ) several times on a page to list different groups of terms from a taxonomy?

The following code displays on term#58 together with a child that says "No Categories". None of the child terms appear on the page. However, if I remove the first use of the tag wp_list_categories( $args ) then the second group appears on the page and lists the children.

I'd appreciate any suggestions on how to overcome this and get both groups to display. Note that the reason I'm approaching the dispay in this manner is that I want to put the terms into a jquery accordion and so I need to separate out the parent term from the children.

//set up the header title for the first group
$taxonomy     = 'glossary';
$include      = 58;
$title        = '';

$argstitle1 = array(
    'taxonomy'     => $taxonomy,
    'title_li'     => $title,
    'include'   =>$include

wp_list_categories( $argstitle1 );

// list terms in a given taxonomy using wp_list_categories.
// Specifies the list to view by using the "child-of" arguments.

$taxonomy     = 'glossary';
$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
$title        = '';
$Child_of     = 58;

$args = array(
    'taxonomy'     => $taxonomy,
    'orderby'      => $orderby,
    'show_count'   => $show_count,
    'pad_counts'   => $pad_counts,
    'include'        => $include,
    'title_li'     => $title,
    'child_of'   => $Child_of

    <?php wp_list_categories( $args ); ?>

1 Answer 1


In the second set of args, you set both include and child_of to 58, which effectively eliminates any possible return.

  • Thanks. I assumed because there was no "$include" that the 'include' argument would be excluded. With 'include' removed everything worked as expected.
    – dorich
    Jun 20, 2012 at 17:53

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.