Like the title says. Using the attribute -> class logic fails to respect WordPress classes and overwrites them. The code example below, result's in the html structure below
wp_nav_menu([
'theme_location' => 'primary-menu',
'container' => false,
'fallback_cb' => false,
'menu_class' => 'example_class',
'li_class_0' => 'bg-red-400',
]);
wp_nav_menu([
'theme_location' => 'primary-menu',
'container' => false,
'fallback_cb' => false,
'menu_class' => 'example_class',
'li_atts_0' => [
'class' => 'bg-red-400',
],
]);
<ul id="menu-primair-menu" class="example_class">
<li id="menu-item-19" class="menu-item ... bg-red-400">
<a href="/">Home</a>
</li>
<li id="menu-item-80" class="menu-item ... bg-red-400">
<a href="/onze-school/">Onze school</a>
</li>
<li id="menu-item-17" class="menu-item ... bg-red-400">
<a href="/werken-bij/">Werken bij</a>
</li>
<li id="menu-item-16" class="menu-item ... bg-red-400">
<a href="/contact/">Contact</a>
</li>
</ul>
<ul id="menu-primair-menu-1" class="example_class">
<li class="bg-red-400">
<a href="/">Home</a>
</li>
<li class="bg-red-400">
<a href="/onze-school/">Onze school</a>
</li>
<li class="bg-red-400">
<a href="/werken-bij/">Werken bij</a>
</li>
<li class="bg-red-400">
<a href="/contact/">Contact</a>
</li>
</ul>
I'll try to look into it later this week and attempt make a PR
Like the title says. Using the attribute -> class logic fails to respect WordPress classes and overwrites them. The code example below, result's in the html structure below
I'll try to look into it later this week and attempt make a PR