Adding CMS Menu
Given a theme_location parameter, the function displays the menu assigned to that location. If no such location exists or no menu is assigned to it will show blank space.The location in the theme to be used must be registered with register_nav_menu() in order to be selectable by the user ,this function is defined in functions.php file in theme folder.
Assigned class to div wrapper of menu
The class that is applied to the ul element which encloses the menu items.
I. Manage Menu
First,Go to storefront area which will register menu added by customer in functions.php. Now, Go to Storefront Design -> Menu Manager.
Go to Manage Menu tab and assign theme location to created menu. e.g. Here assign top-menu to Header Menu Location and save . Go to store-front area ,at top right corner you will see top-menu. Check following screenshot.
II. Edit Menu
1. Enter new menu name in text box and click on 'create menu' button.
2. After creating menu you can see following window with no menu item in it.Add menu item using left-side accordians.
3. There are six tab on left side which are the types of menu item.
URL : Displays url or links of same site.
e.g. Enter Link name as "cart" and Url as "cart.php"
Article : Displays static pages created in cms-pages.In View all tab you can see list of all active static pages.
Text : Displays simple text without any link attached.
e.g. Phone Number.
External Url: Displays external url which take you to another site.
System Pages : Displays system pages , you can see list of pages in view all tab.
Category : Displays list of categories with category id .
- You can add multiple menu item at time.
- If view all list is too long you can ajax search required menu item in search tab.
- You can sort menu item using drag&drop in Menu Structure section.
Simply hold & drag menu item accordion in menu structure and drop it to required position.
5. Other Functionality
- Select menu to be modified using select dropdown as shown in figure.
- Check Active checkbox to activet menu item and save.
- Click on remove to remove single menu item and save.
- Delete whole menu by clicking Delete Menu Button
- Save all changes by clicking Save button.