css - Wordpress: adding active class to wp_nav_menu items -
in wordpress (3.0.1), if use gui update main menu include item called news:
**
url: /news/ navigation label: news title attribute: news
**
the news item shows in menu. great. when click on , navigate /news/ page, wordpress not add current_menu_item class <li>
.
nor give <li>
menu item id or name of "news" - instead it's called unhelpful "menu-item-899".
why doesn't wordpress add current_menu_item class? surely has information needs this? </grumble>
and given above, how can style <li>
item show current item? don't want have use jquery @ page name , match arbitrarily-named ids... option?
you use css style :
/*.current-menu-item controls active state on nav menu */ #primary-menu ul li.current-menu-item a, ul li ul li.current-menu-item { color:#663; }
Comments
Post a Comment