List all subcategories from category

Posted by Prem Tiwari | Updated on

Yes, you can use get_categories() using ‘child_of’ attribute. For example all sub categories of category with the ID of 17:

If you want to display only categories that are direct descendants (i.e. children only) you can use ‘parent’ attribute.


If you like this question & answer and want to contribute, then write your question & answer and email to freewebmentor[@]gmail.com. Your question and answer will appear on FreeWebMentor.com and help other developers.

Related Questions & Answers