Friday, July 29, 2022
HomeWordPress Developmentmenus - wp_nav_menu eradicating containing UL with 'items_wrap' => '%3$s' not working

menus – wp_nav_menu eradicating containing UL with ‘items_wrap’ => ‘%3$s’ not working


I’m trying to mix two menus into one so I want to use wp_nav_menu with out the uls wrapping the listing gadgets. I’ve discovered a number of questions that say this may be completed by setting 'items_wrap' => '%3$s' however this doesn’t appear to be working. Here is my code:

<ul id="main-menu">
    <?php wp_nav_menu( array('menu' => 'Primary Nav', 'container' => '', 'items_wrap' => '%3$s'  ) ); ?>
    <?php wp_nav_menu( array('menu' => 'Secondary Nav', 'container' => '', 'items_wrap' => '%3$s' ) ); ?>
</ul>

However this ends in:

<ul id="main-menu">
    <ul class="menu">
        <li class="menu-home"><a href="/">Dwelling</a>
        <li class="menu-about"><a href="/about">About</a>
    </ul>
    <ul class="menu">
        <li class="menu-contact"><a href="/contact">Contact</a></li>
        <li class="menu-locations"><a href="/areas">Places</a></li>
    </ul>
</ul>

I’m utilizing WordPress 6.0.1 if that makes a distinction

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

- Advertisment -
Google search engine

Most Popular

Recent Comments