I have a menulist with link to a category Articles on my website (and some other links to categories).
When entering Articles from the menulist, the link get black to indicate where you are. Also, a list of subcategories appear in the sidebar (subjects like webdesign, php etc). I have accomplished this with
Now to the problem – when you click a subcategory for ‘Articles’ – like ‘Webdesign’ – the is_category(‘Articles’) is not true any more, and the list of subcategories in the sidebar disapear and the Articles-link in the menulink become blue again.
How do I check that the visitor is still in the Articles-category when they navigate down to subcategories? Is it possible in any other way then making a lot of conditions like
if (is_category(‘Articles’) || is_category(‘Webbdesig’) (and so on)
Thanks for any help. Hope I have translated everything correct, I’m from sweden so english is not my language 😉
- The topic ‘Check for parent category in sidebar’ is closed to new replies.