function hello_nav_menu_css_class($classes, $item) { $classes[] = 'list-inline-item'; return $classes; } add_filter('nav_menu_css_class', 'hello_nav_menu_css_class', 10, 2);