Menus provide a list of links for website navigation. In this lesson you'll learn how to create menus with links to pages and other content, how to place menus in various locations, and how to customize and manage menus.
At the end of this lesson, you will be able to:
- Describe how menus support website navigation.
- Manage the primary menu in WordPress.
- Create a custom menu.
- Modify a menu by adding and removing items.
- Automate new menu items.
- Organize menu items by order and level.
- Place a menu in a secondary theme location.
- Utilize the "Custom Menu" widget.
You will be better equipped to work through this lesson if you have experience in and familiarity with:
- Ability to operate the dashboard
- Ability to differentiate pages and posts
- Knowledge of how to work with categories and tags
- Understanding of how to add widgets to sidebar areas
- Ability to import content into WordPress
- Knowledge of how to activate a theme
- Setting a static front page knowledge might be required to demonstrate the whole scope of the menu
- Twenty Sixteen Theme
- Twenty Fourteen Theme
- Theme Unit Test Data for sample content, if needed
- Are you able to log in to WordPress as an administrator?
- Are you familiar with using the WordPress dashboard?
- Do you understand that themes control the layout of a website?
- Do you understand how hyperlinks are the primary means of website and web navigation?
- Can you differentiate pages and posts, as well as categories and tags?
- Time Estimate: 30-45 minutes
- This lesson uses the dashboard Menus page, not the customizer, though that method is similar.
- If students are weak on screening questions, brief explanations may help.
- Be sure that students have a variety of content including use of pages, posts, and categories.
- If students are using a fresh WordPress installation, they should import the Theme Unit Test Data for sample content.
- Students should activate the Twenty Sixteen theme in order to follow the lesson, or they should be comfortable using their own theme which will have different content and menu locations.
WordPress themes may provide a default menu that automatically adds navigation for the pages of a website. The default menu is typically displayed on the home page and most pages throughout the website. However, themes and templates may display menus in whatever manner a designer chooses. While a default menu can serve a blog or simple website, most websites will benefit from modifications of the primary menu along with the use of custom menus to improve navigation for users. It's helpful to have a plan to indicate what menus are needed for a website. During the web design process, you can create a site map to show how content is arranged, wireframes to indicate where actual menus are located and what items to include, and other planning documents may describe how users navigate the website.
Begin by locating the "primary menu" of your website. Here is an example of a simple primary menu with three page links using the Twenty Sixteen theme. In this example, the menu is located in the upper right corner of the website layout above the header. Your menu may appear in a different location or have different page links.
Use the "Menus" section of the dashboard to access management functions for the primary menu. On the dashboard choose "Appearance" and then "Menus." If you have created or imported content, you may have menus that are already available to use. On the "Menus" administration page you will see two tabs: "Edit Menus" and "Manage Locations". Select the "Manage Locations" tab. 

You can replace a default menu with a custom menu, and you can create multiple custom menus to use in the various menu locations provided by a theme. Custom menus have many benefits. They can:
- Show or hide specific pages
- Edit labels for pages
- Re-order pages
- Enable multi-level menus
- Add posts and post categories
- Allow for custom links to any URL
To create a custom menu, go to Appearance > Menus > Edit Menus. Click the "create a new menu" link, type a short descriptive "Menu Name", as in this example for "Menu Test," then click the "Create Menu" button. 

To start, click the downward triangle to open the "Pages" section, and you'll see three tabs for "Most Recent", "View All", and "Search". "Most Recent" shows a limited list of pages in reverse chronological order by date, while "View All" lists them all - listed as specified by the page order. Search allows you to type some characters and view an autocompleted list of pages to quickly find a page by its title. In this example (using the Theme Unit Test Data), select the following pages by clicking their checkboxes, then click the "Add to Menu" button to add all the items at one time:
- Home
- Sample Page
- Level 1
- Level 2
- Level 3
- Level 2
Notice that WordPress adds the five selected menu items in a flat list in the "Menu Structure" panel, which you may want to customize. First, edit the label of "Level 1" by clicking the downward pointing triangle next to the level 1 page item to open the configuration options and typing "First Level" in the navigation label field. 
This may seem counter-intuitive, but WordPress does not automatically create any specific order or hierarchy of your website pages when you add them to a custom menu. WordPress places new menu items to the bottom and at the same level in a flat list, so you'll probably want to rearrange menu items to meet your needs. WordPress does allow for complete flexibility for customizing menus. In addition to editing labels, you can arrange the order and levels of menu items with drag and drop functionality. Grab the "Sample Page" menu item by holding down the left mouse button, and when you see a four-headed arrow, drag the item to the bottom of the list. You'll see a dashed outline to guide the positioning of the item, and you can drop it into place by releasing the mouse button. 

Specific posts along with post categories and tags can be added as menu items in the same manner as pages. You can relabel and rearrange them as well, mixing them in any order with page items. Using your new custom "Menu Test", add a post menu item, such as the "Hello World" post and relabel it "World." Also, add a category, such as "Media." With the new menu items at the bottom of the menu structure, grab the "First Level" group including the two nested sub items and drag that between the post and category menu items so that your resulting menu looks like this: 
The basis of the World Wide Web and Hypertext Markup Language (HTML) is the ability to link to any other web page, document, or Internet asset. WordPress allows you to manually add a link to anything with a standard Uniform Resource Locator (URL) that functions as a standard web link. This means that you can provide a menu link to a download document, such as a PDF on your website, or to a webpage or resource anywhere else on the web. First, be sure that you have a functional URL for the web address. You may copy the URL from the URL field for a WordPress media item, from the web address of a resource in web browser, or from other sources. You can test the URL by pasting it into a web browser to check that it accesses the web resource correctly. You will create a link to an image attachment page. Go to "Media" in the Dashboard and look for the Golden Gate Bridge image (provided with the Theme Unit Test Data), or select any image in your website. On the "Attachment Details" for the image, click the "View attachment page" link at the bottom of the right column. Select and copy the web address in your web browser, which will look something like this:
http://mywebdomain.com/?attachment_id=755
In Appearance > Menus > Edit Menus, select the "Menu Test" that you created. Open the "Custom Links" section and paste the URL you copied, then type a label such as "Golden Gate," or whatever label applies to your image. Click the "Add to Menu" button and the new custom link will appear at the bottom of the menu. 
Post formats provide a range of specific types of content for which themes may provide custom templates for special formatting. Although post formats are not widely used, if your theme supports them and you have created content using them, then you may add menu items for a format. This would be similar to using categories or tags as a means of aggregating similar types of content.
For a website that will add new pages that should appear on a menu, there's a useful auto add pages setting to automatically add them. The "Menu Settings" below the menu structure has a checkbox to "Automatically add new top-level pages to this menu". However, this setting does not handle child pages for sub items, so those need to be added manually.
Any WordPress theme should support a primary menu location, but its location in the layout will depend upon the particular theme. The primary menu is often located near the top of a website layout, either above, below, or adjacent to the header, logo, or website title; but it may be placed on a sidebar or any location chosen by the designer. You can assign menus to the various locations specified for a theme, and you many need to refer to the theme's documentation to determine where they appear. You'll review how changing themes can change the menu locations available, so you can work with a secondary menu. Go to Appearance > Menus > Manage Locations to view how menus are assigned to theme locations for the Twenty Sixteen theme. Notice that there is a "Primary Menu" and and "Social Links Menu. "

WordPress includes a "Custom Menu" widget that can add a menu to a sidebar. This is available using Appearances > Widgets to activate it in a sidebar location. Although this is a convenient feature, it has some limitations: the widget simply has options to select a menu and set a title, it's not directly integrated with the Menus functions, and themes may not format the widget in the same manner as other menus. You may try using the custom menu widget as an additional exercise.
Create a new menu that has multiple levels
- Do the submenus have to mirror the parent/child settings of pages?
- How does it display as a primary menu?
- How does it display as a secondary menu?
Create several custom menu items with external URLs that are not found on your website
- Can you add any website page?
- Can you add a social media page?
- Can you configure the link to open in a new window or tab?
[tip]On Appearances > Menus > Edit Menus, use "Screen Options" to activate the advanced menu properties for that allow you to change the link's target. This will add a menu item configuration checkbox to "Open link in a new tab." [/tip] Add a custom menu widget to a sidebar
- Does the menu widget appear similar to a standard menu location?
What could be used to determine what menus are needed for a website?
- Site map
- Wireframe
- Planning document
- All of the above
Answer: 4. All of the above
What is the default menu provided by most WordPress themes?
- Main menu
- Primary menu
- Header menu
Answer: 2. Primary menu
Which is not listed in the choices for a type of menu item?
- Page
- Category
- Image
Answer: 3. Image
How do you create a multi-level menu?
- Select multi-level when creating the menu.
- Use the Parent function of the pages.
- Drag the lower level menu items to the right.
Answer: 3. Drag the lower level menu items to the right.
What do you need to make a custom link?
- Social media account
- URL
- Theme support
Answer: 2. URL
- WordPress Menu User Guide @ Codex
- Navigation Menus @ Codex
- Appearance Menus Screen @ Codex
- WordPress Theme Unit Test data @ Codex



