wp_nav outputs escaped quotes
-
Hi, i’m using this:
<?php $defaults = array( theme_location => '', 'menu' => '4', 'container' => 'div', 'container_class' => 'menu-{menu slug}-container', 'container_id' => '', 'menu_class' => 'nyMainNav', 'menu_id' => '', 'echo' => true, 'fallback_cb' => 'wp_page_menu', 'before' => '', 'after' => '', 'link_before' => '', 'link_after' => '', 'items_wrap' => '<ul id=\"%1$s\" class=\"%2$s\">%3$s</ul>', 'depth' => 1, 'walker' => ''); ?> <?php wp_nav_menu( $defaults ); ?>
And it get’s rendered in browser exactly like this:
<div class="menu-{menu slug}-container"><ul id=\"menu-mainmenu\" class=\"nyMainNav\"><li id="menu-item-30" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-30"><a href="https://site.com/v2/?page_id=5">Products Page</a></li> <li id="menu-item-31" class="menu-item menu-item-type-post_type menu-item-object-page current-menu-item page_item page-item-18 current_page_item menu-item-31"><a href="https://site.com/v2/?page_id=18">About</a></li> <li id="menu-item-32" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-32"><a href="https://site.com/v2/?page_id=20">Contact</a></li> </ul></div>
note ..id=\”menu-mainmenu\” class=\”nyMainNav\”><li id=”menu-item-30″..
Is that as it should be?
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘wp_nav outputs escaped quotes’ is closed to new replies.