Register Menus in functions.php

  1. Create the function. Here it is named theme_nav_menus. It can be whatever you want as long as there are no spaces.
  2. Add the call to register_nav_menus(). The array inside is a list of menu_id => menu_name pairs. You can name these whatever you like, but no spaces are allowed in menu_id.
  3. The add action is necessary or the function won't run. Make sure the name used, here it's theme_nav_menus, is exactly the same in the function name as it is in add_action.

The example below has three menus: main_nav, footer_nav and other_nav. To add a fourth you would put a comma after 'My Other Nav" and then another pair.

Register Menus in functions.php

Creating a Menu

  1. Select Appearance > Menu
  2. You will not see the Theme Locations options until you craete the first menu
  3. Click the + sign and add a menu name and
  4. Click Create Menu to create your first menu.

Choose a Location for the Menu

Once you create a menu then the Theme Locations will appear (1). Use the dropdown to place the menu you made (2) in the appropriate place.

Add The Pages, Posts etc to the menu

Add the pages (or posts or categories or custom links) to you menu.

  1. Check what you want
  2. Click Add to Menu
Add The Pages, Posts etc to the menu

Organize menu.

You can drag the menu items around to reorder them and create subnavigation. You can also change the Label that people will see. Remember to click Save Menu (1) when you are done.

Checking "automatically add new top-level pages" (2) means that if you create a page (not a post) and it doesn't have a parent then it will be automatically added to this menu.

Organize menu.

Add Other Menus

  1. You can click the + again to add another menu and
  2. set it to one of your other locations.

functions.php — Finally call the menu in a template using the wp_nav_menu() template tag.

  1. Use the id you created in functions.php when calling wp_nav_menu
  2. You will see the name in the dashboard label.

Try to keep both of these similar so you don't confuse yourself.