Asked 30+ days ago
19 May 2017
Views 269

posted

how to remove container div of the navigation menu in wordpress


<div class="menu">
<ul>
<li class="page_item page-item-16"><a href="http://localhost/example/home/">Home</a></li>
<li class="page_item page-item-2"><a href="http://localhost/example/sample-page/">Sample Page</a></li>
</ul>
</div>


how to remove container div of the navigation menu in Wordpress

it should be direct <ul> , there is no <div class="menu">


wp_nav_menu( );


Mitul Dabhi

Mitul Dabhi
answered Jan 21 '18 20:17

try to container to false . it should remove wrapper div in nav menu in Wordpress

so try

      wp_nav_menu( array( 'container'=> false, 'menu_class'=> false, ) ); 
Edit Answer
Share
kiran

kiran
answered Jan 21 '18 20:17


 wp_nav_menu( array( 'container' => '' ) );  


make container argument empty .
Edit Answer
Share
Post Answer