• Yet another wp_list_categories question…

    I am trying to list the Grandchildren of my current category, but NOT the Children. Currently this code lists all children and grandchildren categories. Anyone know can I limit this to just Grandchildren? (p.s. There is also some category-icon specific stuff in there)

    <?php if (is_category()) {
      $this_category = get_category($cat);
      if (get_category_children($this_category->cat_ID) != "") {
        echo "<h1>Subcategories with Cat Icons</h1>";
        echo "<ul>";
        if (function_exists('put_cat_icons'))
        	put_cat_icons( wp_list_categories('orderby=id&show_count=0&title_li=
    &use_desc_for_title=1&echo=0&child_of='.$this_category->cat_ID));
    	else
    		wp_list_categories('title_li');
        echo "</ul>";
      }
    }?>
Viewing 1 replies (of 1 total)
  • Thread Starter Adam W. Warner

    (@awarner20)

    Still hoping to get advice on this one. How can I dynamically list grandchildren of the current category?

    I was hoping to find get_category_grandchildren or a grandchild_of parameter, but it looks like those don’t exist.

    Can I skip a level with the depth= parameter?

    Can anyone offer some assistance?

Viewing 1 replies (of 1 total)
  • The topic ‘List Grandchild Categories of Parent (but NOT Children of Parent)?’ is closed to new replies.