Remove LI Elements From Output of wp_nav_menu

You can remove or change the <ul> container that you get by default with wp_nav_menu (codex) through parameters, but you can’t remove the <li> elements that wrap each menu item. This is how you can actually remove them: $menuParameters = array( ‘container’ => false, ‘echo’ => false, ‘items_wrap’ => ‘%3$s’, ‘depth’ => 0, ); echo … Continue reading Remove LI Elements From Output of wp_nav_menu