How To Remove The UL Tag From The WordPress Menu

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.

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.

               wp_nav_menu( array(
                    'theme_location' => 'primary',
                    'container' => false,
                    'items_wrap' => '%3$s'
               ) );
          <li class="new-list-item">Your new list item</li>

Note that we’ve passed in container and items_wrap into the wp_nav_menu() function’s arguments.