Hello; I'm building a custom menu with highlighting of the items, etc.
All is working fine when the user is browsing pages or categories. (I use conditions like "if (is_category('cat1'))", etc.)
The problem is that it's difficult for posts :
a post can be attached to several categories, so it's hard to highlight the one I want...
My idea was to use
$_SERVER['REQUEST_URI'];
split it and isolate the $cat var.
But the problem is that, when you click on a post, the content of $_SERVER['REQUEST_URI']; is not the previous page but the actual one (I guess it's because of the wordpress template system).
So, is there another way to proceed ?
Thanks !