Main Navigation
Bethlehem supports Megamenu Dropdown, with the help of two plugins that comes bundled with the theme namely : Visual Composer plugin and Bethlehem Extensions plugin.
1. Static Block Post Type
A megamenu item in Bethlehem theme is a Static Block. This Static Block is available on activating Bethlehem Extensions Plugin.
2. Enable Visual Composer for Static Block
- Navigate to Settings > Visual Composer.
- In Post Types under Role Manager tab , make sure custom is selected and static_block is checked.
- Go to Static Content > Add New and make sure it has a button just below the title with visual composer icon and text that reads Backend Editor.
- Navigate to Static Content > Add New.
- Give it a title, lets say "Pages Submenu" item. The title is not used anywhere in displaying the menu.
Click on Backend Editor. It will display Visual Composer Backend Editor. We will use this back end editor to build our megamenu item.
Let us add a simple text block. Click on Add text block button and the result will look like this.
- Click on Publish button.
- Navigate to Appearance > Menus.
- On top right corner of your screen, you will find a dropdown menu Screen Options. Click on it.
- In the dropdown that appears, check on Static Content Blocks under Show on screen. You will now see Static Content Blocks listed in the left side.
- Choose the menu you want to edit. In my case I've chose a menu that is hooked to Main Menu location.
- Now check the Pages Submenu and click on Add to menu.
- Drag the Pages Submenu box and drop it under any existing menu as a submenu.
- Click on Save Menu.
- Now the megamenu will is added as a submenu and it should look like this:
If we want the megamenu to be full width ? It is easy.
- Go to Appearance > Menus .
- Click on the caret on the top-right of menu item that contains the megamenu subitem to expand it.
- In the CSS Classes text box, enter
full-width
. This will make the megamenu to full width.
- If the CSS Classes field is not visible. Click on Screen Options on the top-right corner of the screen and check on CSS Classess under Show advanced menu properties.
- Click on Save Menu.
Alert : Please do not use Static Content Block as a top level menu item or as submenu menu item beyond level 1. Do not use other menu items with Static Content Block menu item.