Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

current menu item

function special_nav_class($classes, $item){
     if( in_array('current-menu-item', $classes) ){
             $classes[] = 'current ';
     }
     return $classes;
}
add_filter('nav_menu_css_class' , 'special_nav_class' , 10 , 2);
 
PREVIOUS NEXT
Tagged: #current #menu #item
ADD COMMENT
Topic
Name
9+9 =