• Hi,
    the aim is to add classes to menu items.
    Accordingly to the codex I added this function to my function.php:

    function special_nav_class($classes, $item){
         $classes[] = "new-class";
         return $classes;
    }
    add_filter('nav_menu_css_class' , 'special_nav_class' , 10 , 2);

    but nothing happened.
    I mean I checked firebug and no “new-class” is added to the menu items.

    Why? How can I make it working?

    Thank you

Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Adding class to menu items doesnt' work’ is closed to new replies.