Inside the category.php file I have a custom navbar which is…
<ul class = "nav nav-tabs nav-justified">
<li><a href="http://example.com/blog/" title="View all posts">All Categories</a></li>
<?php wp_list_categories('orderby=name&title_li='); ?>
</ul>
I would like the li for the current category to have class = “active”. How can I code this?
Thank you
You can filter the output on
wp_list_categories
:If you are stuck with an outdated PHP version ⦠find a better web hosting. In the mean time, you can try this: