HTML5 Navigation without a List with WordPress’ wp_nav_menu
January 30, 2013
$menuParameters = array(
'echo' => false,
'items_wrap' => '<nav>%3$s</nav>',
);
echo strip_tags(wp_nav_menu( $menuParameters ), '<a><nav>' );
Result:
<nav>
<a href="...">...</a>
<a href="...">...</a>
<a href="...">...</a>
</nav>
Source: Remove LI Elements From Output of wp_nav_menu
The Snippets Story
This is how you build a HTML5-navigation without lists in WordPress. I slightly changed the code I found on CSS-Tricks. Had to post this after todays reading of “Navigation in Lists: To Be or Not To Be” by Chris Coyier.
Back Tweet me Share me Plus me-
Categories
Archive
Related Posts
I'm reading ...
Thank you …
Samuel Horn af Rantzien, for designing this blog
Internetavdelningen, for sponsoring webspace and domain
My family, for not complaining too much