Trying to remove the ul tag, including containers around the menu? All you may need is to pass in an items_wrap into your wp_nav_menu() function’s argument.
1 answers
1
Removing the navigation's ul tag
To add your custom container around the wp_nav_menu() function, simply copy and paste the code below to your theme’s menu location file.
<nav> <ul> <?php wp_nav_menu( array( 'theme_location' => 'primary', 'container' => false, 'items_wrap' => '%3$s' ) ); ?> <li class="new-list-item">Your new list item</li> </ul> </nav>
Note that we’ve passed in container and items_wrap into the wp_nav_menu() function’s arguments.
— Support WizardAnswer 1