Programmatically selecting / highlighting menu item
-
Hi!
I’ve created a menu in WordPress that’s basically built up out of three levels. On the first page you can only see one level, when you select on of the items it highlights that item and shows the second level and so on. This works great for the pages that the menu items link to. But I also want to be able to highlight certain menu items when not on their target locations. This is because I have custom post types that belong to a certain menu item, or you could say they are children to a certain menu item. But I don’t want to add every single one of them to the menu and hide that menu to highlight the parent. What I want is to, with code, when displaying a certain post type, activate a certain menu item and thus making it seem like you’re on a certain page when you’re in fact on a child of that page. Hope you get what I mean. I can’t for my life figure out a way of doing this though. Wish I could just access the menu object and say that “Hey, now you’re active whether you like it or not!”.
The menu can be seen here: http://dl.dropbox.com/u/33595106/menu.png
Any ideas?
Thanks in advance!
Kind regards,
Michael
The topic ‘Programmatically selecting / highlighting menu item’ is closed to new replies.