function - Wordpress: how to get first level of children from a category? -
I want to know if there is a function that returns only the first level of children of subcategories.
cat 1 sub -1.1 sub -1.2 sub-1.2.1 cat2 sub--2.1
Here only I want: sub-1.1, sub- 1.2 and sub-2.1.1
'$ this_category- & gt; Cat_ID);thanks
please try
wp_list_categories (array ('depth' => 2));
Comments
Post a Comment