Highlighting Child Pages
-
Ok, so I’m sure that this is a relatively simple problem with an equally simple solution, but I’m stuck. I’m building a site that has a static home page with the blog page as a menu item. Pretty straight forward.
The problem is that the blog page menu item is only assigned the class “current-menu-item” when currently clicked on it and WordPress is using the “index.php” file. Once a post is clicked and WordPress begins using the “single.php” file, that class no longer is assigned to the menu item, thereby not allowing it to be highlighted as the active menu item.
I’ve read plenty of solutions that use conditional statements to determine if a page is a child page or not, but the problem I’m facing is that I’m using the WordPress 3.0 menu option in the GUI, which means that my navigation is being dynamically created.
My question is this: How can I get the “blog” link to be the .current-menu-item when WordPress is using single.php, category.php, tag.php, etc. while still using the GUI menu system and not hardcoding in my navigation?
Any help would be greatly appreciated!
- The topic ‘Highlighting Child Pages’ is closed to new replies.