Support » Themes and Templates » WP theme dev menu question
6 years, 3 months ago
It’s a long time ago that I themed a WP theme so I’ve forgotten a lot of things :(.
I want to style a menu with my own id and classes.
so I call the menu function wp_nav_menu and I see that this is wrapped in a div, but I don’t want this, how can I remove the div?
I tried to use this:
'menu' => '',
'container' => '',
'menu_class' => 'horizontal-list clearfix',
'menu_id' => 'nav',
'echo' => true,
'theme_location' => 'index'
<?php wp_nav_menu( $nav_args ); ?>
But it doesn’t work, anyone knows why?
Short answer: You can’t. Although the Codex documentation implies that it’s possible to remove or change the container, it’s not currently possible.