Using wp_list_categories, how to set a current state if a grandchild is showing?
-
I’m attempting to style a menu using wp_list_categories. Worpress naturally creates the current-cat and current-cat-parent classes, so that’s easy to style. What I want is to carry this through to the child’s child as well as an actual post (single) that is beneath the category, no matter how far beneath.
To put this another way, let’s say I have a category/post hierarchy like this:
- Articles
- Health
- Anti-Aging
- How to Stay Young
No matter which category, or even if I click on the article, I want the word “Articles” to be styled to show a “current” state.
Any idea how I could do this dynamically?
Thanks,
Gary
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Using wp_list_categories, how to set a current state if a grandchild is showing?’ is closed to new replies.