Answers for "add class to li in wordpress menu"

0

add class to li in wordpress menu

function atg_menu_classes($classes, $item, $args) {
  if($args->theme_location == 'secondary') {
    $classes[] = 'list-inline-item';
  }
  return $classes;
}
add_filter('nav_menu_css_class', 'atg_menu_classes', 1, 3);
Posted by: Guest on June-21-2021

Code answers related to "add class to li in wordpress menu"

Browse Popular Code Answers by Language