I am learning wordpress
together with bootstrap
and somehow I can\'t add class
on UL
tag.
In the screenshot, I want t
I had the same problem, so I changed the word "theme_location" to "name" and it works perfectly.
Example:
$defaults = array(
'[INSTEAD OF PUTTING "theme_location" PUT "name"]' => 'THE NAME OF YOUR "theme_location"',
'menu_class' => 'YOUR CLASS', **[It will change the class]**
);
wp_nav_menu( $defaults );
So for your code:
wp_nav_menu( array(
'name' => 'top-menu',
'menu_class'=> 'YOUR CLASS'
) );
wp_nav_menu( $defaults );
enter image description here
You can also put it into a container like a