Reputation: 8873
The following code
wp_nav_menu( array(
'theme_location' => 'primary',
'container' => '',
'menu_id' => 'primary-menu',
'items_wrap' => '<a class="mdl-navigation__link">%3$s</a>'
)
);
will display an html code
<ul aria-expanded="false" class=" nav-menu">
<li class="page_item page-item-2">
<a href="http://localhost/gabriel/sample-page/">Sample Page</a>
</li>
</ul>
in the browser. What I want to do is, I'd like to remove <ul>
and <li>
wrapper in <a>
Can you help me?
Upvotes: 0
Views: 4904
Reputation: 523
Pass following argument in wp_nav_menu function 'container' => '','items_wrap' => '%3$s' .suggested from Martti Laine,Dannamite answer https://wordpress.stackexchange.com/questions/7968/how-do-i-remove-ul-on-wp-nav-menu
Upvotes: 2
Reputation: 125
Check this thread for options you have.
https://wordpress.org/support/topic/customized-wp_nav_menu
Upvotes: 0