Using wp_nav_menu for multiple menus with dynamic highlighting
-
Hey,
I am using TwentyTen and have created a menu which consists of a few top level pages.
To display the navigation I am using wp_nav_menu() as shown below:
<div id="menu" role="navigation"> <?php wp_nav_menu( array( 'container_class' => 'menu-header', 'theme_location' => 'primary' ) ); ?> </div><!-- #menu -->
For dynamic highlighting and styling I am using CSS and the .current_page_item class:
#menu { float: right; color: #fff; } #menu ul { list-style: none; font-family: Otari; text-shadow: 0 1px #637bae; font-size: 22px; } #menu li { float: left; margin-left: 21px; height: 75px; text-align: center; line-height: 75px; min-width: 47px; } #menu li:hover { float: left; margin-left: 21px; background: url(images/menu_hover.png) top center no-repeat; } #menu li.current_page_item { float: left; margin-left: 21px; background: url(images/menu_hover.png) top center no-repeat; } #menu a:link, a:active, a:visited { color: #fff; text-decoration: none; }
All of this is working perfectly on my main navigation. However when I try to duplicate the menu and include it within my websites footer the dynamic highlighting stops working? I have no idea why as the code is exactly the same!
Any help would be appreciated,
Thanks!
Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
- The topic ‘Using wp_nav_menu for multiple menus with dynamic highlighting’ is closed to new replies.