bassjobsen / jbst

Powerful theme framework that can be used as a standalone website builder or as a framework to create child themes for wordpress build on Twitter's Bootstrap 3. Full customizable with LESS

Home Page:http://www.jbst.eu/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

menu navbar has only two levels

bassjobsen opened this issue · comments

Add new implement of the menu structure with https://github.com/twittem/wp-bootstrap-navwalker. Infinitely number of levels of submenus possible now. Set the numbers in the customizer under "Navigation".
Be careful to set the level > 1 (0 default), see: twbs/bootstrap#6342 (@mdo : "Submenus just don't have much of a place on the web right now, especially the mobile web.").

submenus

Based on http://stackoverflow.com/questions/18023493/bootstrap-3-dropdown-sub-menu-missing you will find two other setting for the submenus beside the level.

clickable parents

(Should the parent (indicator) of a submenu be clickable? ). In the case you have main > sublevel 1 > sublevel 2. sublevel{x} can be a parent and a page. When clickable parents has switched on hover the item will open the submenu and click the item will navigate to the page.
Not using this option and using empty pages may cause problem with your page breadcrumbs which will contain links to the empty pages. Add links with href="#" to your menu in stead of pages to prevent this.

Open submenus on click (for mobile usage)

As mentioned by @julienrenaux in http://stackoverflow.com/a/18682698/1596547 hover events to open the submenus won't work on mobile (touch) screens. Switching this option on make the submenus open on click.
Don't use this option in cobination with clickable parents.

Credits:

@twittem: WordPress nav walker
@skelly: submenu CSS code
@julienrenaux: mobile javascript

The above fix doesn't seem to work for "Should the parent (indicator) of a submenu be clickable?"