rachelbaker / bootstrapwp-Twitter-Bootstrap-for-WordPress

CSS toolkit from Twitter for use as a WordPress theme
http://twitter.github.com/bootstrap
652 stars 136 forks source link

Top Navigation Vertical Dividers? #52

Open stebesplace opened 12 years ago

stebesplace commented 12 years ago

I attempted to break out the menu walker into two functions, and load them independently, to have two top menus (primary & secondary) which allows for placing a vertical divider between them. I couldn't get it to work quite right, since it loaded my secondary menu in place of the primary. Might be something with the walker.

Is there an easier way to accomplish this? Otherwise I'll rethink my function. Thanks!

evagoras commented 11 years ago

Have you tried simply adding the divider in the display function inside your template? Something like this:

wp_nav_menu( array( 'menu' => 'main-menu', 'container_class' => 'nav-collapse', 'menu_class' => 'nav', 'fallback_cb' => '', 'menu_id' => 'main-menu', 'after' => '<li class="divider-vertical"></li>', 'depth' => 1, 'walker' => new Bootstrapwp_Walker_Nav_Menu() ) );

stebesplace commented 11 years ago

I haven't, but will give that a shot when I get a chance next. Thanks!