I would like to know how do I get subcategories to show ‘under’ their parent category on the side bar in wordpress? Ideally this would be a tree-like fashion.
I’m surprised this isn’t standard. The html markup seems to not even have any css usable classes that i can style to distinguish between the levels of category. This is what I have:
<h3 class="widget-title">Categories</h3>
<ul>
<li class="cat-item cat-item-3"><a href="http://localhost/sites/wordpress/?cat=3" title="View all posts filed under test parent">test parent</a> </li>
<li class="cat-item cat-item-4"><a href="http://localhost/sites/wordpress/?cat=4" title="View all posts filed under test sub 1">test sub 1</a> </li>
<li class="cat-item cat-item-1"><a href="http://localhost/sites/wordpress/?cat=1" title="View all posts filed under Uncategorized">Uncategorized</a> </li>
</ul>
You need to check “show hierarchy” in the category widget’s options.