Home › Forums › Support › Navigation list class This topic has 3 replies, 2 voices, and was last updated 8 years, 4 months ago by Tom. Viewing 4 posts - 1 through 4 (of 4 total) Author Posts May 14, 2015 at 6:45 pm #107997 Jean Paiva Developer Hey Tom, I want to add a custom class for the navigation list items, I don’t know, maybe I need to use this funciton? <?php add_filter('nav_menu_css_class' , 'special_nav_class' , 10 , 2); function special_nav_class($classes, $item){ if(is_single() && $item->title == "Blog"){ //Notice you can change the conditional from is_single() and $item->title $classes[] = "special-class"; } return $classes; } ?> From: https://codex.wordpress.org/Function_Reference/wp_nav_menu What do you think? May 14, 2015 at 11:14 pm #108021 TomLead Developer Lead Developer Are you wanting to add custom classes to specific menu items? If so, go to “Appearance > Menus” – in the top right corner, click “Screen Options”. Then check the “CSS Classes” checkbox. Now when you open your menu items, you’ll be able to give them a class. Let me know ๐ May 16, 2015 at 6:57 am #108294 Jean Paiva Developer Thank you Tom, I never used this! May 16, 2015 at 9:10 am #108310 TomLead Developer Lead Developer No problem! ๐ Author Posts Viewing 4 posts - 1 through 4 (of 4 total) You must be logged in to reply to this topic. Log In Username: Password: Keep me signed in Log In