Supposed the specified category name is "product", which has three layered sub-categories. The structure is like the following:
- product one
- product two
- product three
- product four
- product three
- product two
I want to output all the subcategory names in the sidebar.php
of my theme. How do I do?
in my theme index.php i using: <?php include("productHallofHome.php");?>
in productHallofHome.php i using code:
<ul class="productList_h">
<?php wp_list_categories( 'child_of=4&depth=0'); ?>
</ul>