How to get a list of child category?
  • D007 March 20
    How
  • Exp March 20
    $this_category = get_category($cat);
    if (get_category_children($this_category->cat_ID) != "") {
    wp_list_categories('orderby=id&show_count=0&depth=1&hide_empty=0&title_li=
    &use_desc_for_title=1&child_of='.$this_category->cat_ID);
    echo ' ';
    }
    } ?>



    The code will be needed if you want to organize a submenu of categories without the help of plug-ins when the child categories are disclosed only in passing in the main section.
Add a Comment

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Sign In Apply for Membership

In this Discussion