Custom html after each menu item
-
Hi guys
I am using the Reverie theme .
In my main primary menu I want to add a custom piece of html (a slash basically, which is being styled up slightly)
I have tried adding this under wp_nav_menu as
'after' => '<div class="menuSlash">/</div>',
but this adds it to every item, including the dropdowns.Is there a way I can add this to only the top level menu items?
Here is the full menu code:
<nav id="primaryNavigation" role="navigation"> <?php wp_nav_menu( array( 'theme_location' => 'primary_navigation', 'container' =>false, 'menu_class' => '', 'echo' => true, 'before' => '', 'after' => '<div class="menuSlash">/</div>', 'link_before' => '', 'link_after' => '', 'depth' => 0, 'items_wrap' => '<ul class="nav-bar">%3$s', 'walker' => new reverie_walker()) ); ?> </nav>
Thanks,
Ian
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘Custom html after each menu item’ is closed to new replies.