Revision: 37730
Initial Code
Initial URL
Initial Description
Initial Title
Initial Tags
Initial Language
at December 16, 2010 07:05 by baires
Initial Code
add_filter( 'nav_menu_css_class', 'additional_active_item_classes', 10, 2 ); function additional_active_item_classes($classes = array(), $menu_item = false){ if(in_array('current-menu-item', $menu_item->classes)){ $classes[] = 'active'; } return $classes; }
Initial URL
http://wpcanyon.com/tipsandtricks/adding-classes-to-the-current-page-item-in-wp_nav_menu/
Initial Description
Initial Title
Adding Classes to the Current Page Item in wp_nav_menu()
Initial Tags
class, wordpress
Initial Language
PHP