List Grandchild Categories of Parent (but NOT Children of Parent)?
-
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)
Viewing 1 replies (of 1 total)
- The topic ‘List Grandchild Categories of Parent (but NOT Children of Parent)?’ is closed to new replies.