I am using Bootstrap nav walker
for creating WordPress menus. What it creates
<ul id="primary-menu" class="navbar-nav ml-lg-auto font-weight-bold">
<ul class="dropdown-menu animated fadeIn" aria-labelledby="menu-item-dropdown-119">
<ul class="dropdown-menu animated fadeIn" aria-labelledby="menu-item-dropdown-119">
<ul class="dropdown-menu animated fadeIn" aria-labelledby="menu-item-dropdown-119">
Now I don't want to add classes on third & fourth level of UL. How I can do it?Is it possible without JS.
You can write script for third & fourth level of menu.
if ( $args->has_children && $depth === 0){ $class_names .= ' dropdown'; } elseif($args->has_children && $depth == 3){ $class_names .= ' '; }
Try something like that.