Help! Nav Issue( ' nav ' => ' ' ), Can't remove>> Div
-
I want to remove the:
<div id="menu"> Text text text </div>But I am not able to….
<nav id="menu" role="navigation"> <?php wp_nav_menu(array( 'nav' => false, 'theme_location' => 'main-navigation')); ?> </nav><div class="menu"> <ul><li class="page_item page-item-12"><a href="http://localhost/wordpress/?page_id=12">Home</a></ul> </div>Helppppppppp !!!!! `
-
Yep! Um, noooooooo….. Not working……
<?php wp_nav_menu(array('container' => false,'theme_location' => 'main-navigation', )); ?>I believe this is correct, this in respect to the links you have given me, goodness, it is not working…..
I’ve used the following for a simple html5 menu:
<nav id="nav" role="navigation"> <ul> <?php wp_list_pages('sort_column=menu_order&depth=1&title_li='); ?> </ul> </nav>andrew.macdermid, thank you for your response…. I know you had done it out of good faith, but I have to ask, WHAT?
I don’t get it…. This after looking at other examples, looks not right in a sense.
Perhaps, of you broke it down, and explain to me what is going here, then it may make sense.
Thank you….
<?php wp_nav_menu( array( 'theme_location' => 'primary', 'container' => '', 'menu_id' => 'nav' ) ); ?>That spits out the menu with no surrounding div. Just remember, this only works if wp_nav_menu is being used, meaning, you need to have a custom menu in place. Otherwise, wp_page_menu is the fallback, and the parameters you are tacking on to wp_nav_menu do not apply to wp_page_menu as well. I haven’t figured out how to get rid of that div yet…
wp_list_pages can be used as a quick and simple menu. As it only generates list items you can add your own surrounding containers.
Sort the list items by menu order (page order):
sort_column=menu_orderShow pages one level down (just the top level pages)
depth=1Don’t show the default heading of ‘Pages’
title_li=
The topic ‘Help! Nav Issue( ' nav ' => ' ' ), Can't remove>> Div’ is closed to new replies.