When you first make a WordPress site and start creating pages, you may notice your site is missing something crucial: a menu. Menus are important because they are the main way your users navigate your site—that’s why the primary menu is also called the navigation. WordPress does not create menus automatically, so you will need to make one yourself.
Creating a Menu
To begin, you must first navigate to the Menus page. From your website, you can hover over your site name in the admin toolbar and select Menus from the drop down.
Alternatively, from the dashboard of your site, you can hover over Appearance in the sidebar and select Menus from the options.
On the Menus page, you will see the menu editor. Select "Create a new menu" at the top of the page. Enter a name for your menu in the Menu Name box. Then select the Create Menu button to create your new custom menu.
Adding Items to a Menu
On the left side of the menu editor is a box with multiple sections. Each section is a way of adding an item to your menu. Not all sections will be visible by default. The Pages section will be visible and open by default, but posts, custom links and categories will automatically be visible as well.
- Pages lists all pages on your site.
- Posts lists all posts on your site.
- Custom links allow you to add any link to your menu. This is useful for linking to external sites.
- Categories lists all categories on your site.
Note: Custom links can be used to create top-level menu items that don't link to other pages. This is useful when you want to use a top-level as a label for a group of sub-level items. To accomplish this, simply add a hash(#) instead of a URL.
To add more sections, click Screen Options at the top of the screen. All available options for adding items are under the Boxes heading. Check or uncheck items to choose whether or not they are visible in the editor. Click Screen Options again to collapse screen options.
To add an item to a menu, simply fill out the information in one of the sections in the sidebar and select Add to Menu. The item will then appear on the right side of the page in the area called Menu Structure.
Arranging Menu Items
Once you have added multiple items to your menu, you can arrange them in the Menu Structure area. New items will go to the bottom, or the end, of the menu. To move an item, simply drag and drop it into position. To create submenu items, position the item under the top-level menu item and drag it slightly to the right. Sub-level items will appear to be indented. When you view your site and hover over a top-level menu item, its submenu items will appear in a drop down. You can have sub-levels within sub-levels, but in most cases, it is recommended you have no more than two or three sub-levels.
Customizing Menu Options
If you click on the arrow on the right side of an item, the options will expand and you can customize the item. The options visible by default are:
- Navigation Label - This specifies the title of your menu item. This is the label that visitors will see when they use your menu.
- Original (URL) - A direct link to the original source of the menu item. For custom links, this field will appear as URL instead of Original.
The rest of the options are hidden by default. To make them visible, select Screen Options at the top of the screen and check the boxes under "Show advanced menu properties." The advanced menu properties are:
- Title Attribute - This specifies the alternative (alt) text of your menu item. This text will be visible when a visitor's mouse hovers over the menu item.
- Link Target - Appears as a checkbox that says "open link in a new tab." For links that direct your users to a different site, checking this box is recommended.
- CSS Classes - Add optional CSS classes to the menu item.
- Link Relationship (XFN) - Allows for the generation of XFN attributes automatically so you can show how you are related to the authors/owners of site to which you are linking. See Link Relationship for details.
- Description - A description for the menu item. The description will be visible in themes that support it. EWU themes do not.
Removing Menu Items
To remove a menu item, open the customization options by clicking the arrow on the right side of the menu item. At the bottom of the item's box, there is a link that says Remove. Click this link to remove the menu item.
Menu Settings
Below Menu Structure is an area called Menu Settings. There are two options available under Menu Settings. They are:
- Auto Add Pages - Checking this box will mean that all new parent pages will automatically be added as top-level items in the menu. This option is not recommended, as it lessens the control you have over the content of your menu. For more information about parent and child pages, see our article: Creating a Page.
- Display Location - The location where you want your menu to appear. If this is your main menu, check the Primary Navigation Menu box (Blogs theme and Sites theme) or the After Menu Header box (Faculty theme). The options in Display Location may be different in different themes.
Saving Changes to a Menu
When you are finished making changes to your menu, save your changes by clicking the Save Menu button located at both the top and bottom of the menu editor. Your site will now show the updated menu.
Menu Best Practices
To learn about best practices for creating menus, see our next article, Menu Best Practices.