Lesson 12 of 50
24% Complete
24%

Menus and Navigation in WordPress

In this lesson, you will learn how to create navigation menus, add pages and custom links, organize menu items, and display navigation on your WordPress website.

Learning Objective: Learn to organize website links into menus so visitors can easily navigate between pages and sections.

1. What Is a Navigation Menu?

A navigation menu is a collection of links that helps visitors move between different pages and sections of a website.

Example of a website menu:

Example navigation menu for learning purposes.

2. Why Are Menus Important?

  • They help visitors find important pages.
  • They organize website navigation.
  • They improve the overall user experience.
  • They make important sections easier to access.
  • They help visitors understand the website structure.

3. Common Types of Website Menus

Menu Type Description
Primary Menu The main navigation menu of a website.
Footer Menu Displays useful links in the footer.
Dropdown Menu Displays additional menu items under a parent item.
Social Menu Provides links to social media profiles when supported by the theme.
Mobile Menu Navigation designed for smaller screens.

4. How to Create a Menu in WordPress

The method for creating menus depends on your active theme. Classic themes generally provide a menu management screen, while block themes commonly use the Site Editor and Navigation block.

Method A: Classic Themes

  1. Log in to your WordPress admin dashboard.
  2. Open Appearance → Menus.
  3. Enter a name for the menu, such as Main Menu.
  4. Click Create Menu.
  5. Select the pages you want to add.
  6. Click Add to Menu.
  7. Arrange the items in the desired order.
  8. Choose a menu display location if one is available.
  9. Save the menu.

Method B: Block Themes

  1. Open Appearance → Editor.
  2. Open the header template part or the area containing navigation.
  3. Select the Navigation block.
  4. Add existing pages or custom links.
  5. Arrange the navigation items.
  6. Save your changes.
Note: If you cannot find Appearance → Menus, your theme may use the Site Editor and Navigation block instead.

5. Add Pages to a Menu

You can add existing pages such as Home, About Us, Services, and Contact Us to a navigation menu.

For a classic theme:

  1. Open Appearance → Menus.
  2. Select the pages from the available pages panel.
  3. Click Add to Menu.
  4. Drag the items into the desired order.
  5. Save the menu.

For a block theme, select the Navigation block in the Site Editor and use its controls to add pages.

6. Add Custom Links

A custom link allows you to add a URL that is not necessarily an existing WordPress page.

Examples:

  • A link to an external website.
  • A link to a course registration page.
  • A link to a specific section of a website.

In a classic theme:

  1. Open Appearance → Menus.
  2. Expand the Custom Links panel.
  3. Enter the URL.
  4. Enter the link text.
  5. Click Add to Menu.
  6. Save the menu.

In a block theme, use the Navigation block's add-link controls.

7. Arrange Menu Items

Menu items can be arranged to control the order in which visitors see links.

Example order:

  1. Home
  2. About Us
  3. Courses
  4. Services
  5. Contact Us

In classic themes, drag menu items up or down to change their order. In block themes, use the Navigation block controls.

8. Create a Dropdown Menu

A dropdown menu displays submenu links under a parent menu item. It is useful for organizing related pages.

Example Dropdown Structure
  • Home
  • About Us
  • Courses
    • Web Development
    • Computer Applications
    • Digital Marketing
  • Contact Us

Classic Theme Method

  1. Open Appearance → Menus.
  2. Add the parent item, Courses.
  3. Add the related submenu items.
  4. Drag each submenu item slightly to the right beneath Courses.
  5. Save the menu.

Block Theme Method

  1. Open the Site Editor.
  2. Select the Navigation block.
  3. Add or select the parent navigation item.
  4. Use the available submenu controls to organize related links.
  5. Save the navigation changes.

9. Assign a Menu Location

Some classic themes provide display locations such as Primary, Header, or Footer. Assigning a menu location tells the theme where the menu should appear.

  1. Open Appearance → Menus.
  2. Select the menu you want to display.
  3. Find the menu settings or display locations.
  4. Select the appropriate location.
  5. Save the menu.

Available locations depend on the theme. Block themes may manage navigation directly through template parts in the Site Editor.

10. Edit or Remove a Menu Item

To change a menu item:

  1. Open the menu editor or select the Navigation block.
  2. Choose the item you want to change.
  3. Update its label or link if needed.
  4. Save your changes.

To remove an item, use the available Remove option in the menu editor or Navigation block controls.

Removing a link from a menu does not delete the actual page.

11. Menu Design and Mobile Navigation

A good navigation menu should be easy to read and use on both desktop and mobile devices.

  • Keep the main menu short and clear.
  • Use descriptive labels.
  • Group related pages under meaningful headings.
  • Avoid too many levels of dropdown menus.
  • Check that text is readable on mobile screens.
  • Test links and dropdowns after saving.

12. Common Menu Problems

Problem Possible Solution
Menu is not visible Check the menu location or the Navigation block in the theme.
Page is missing from the menu Add the page to the menu and save the changes.
Dropdown does not work Check the submenu structure and theme behavior.
Wrong link opens Check the URL assigned to the menu item.
Menu is difficult to use on mobile Review the responsive navigation settings and test on a small screen.

13. Practical Assignment

Task: Create a Website Navigation Menu
  1. Create a menu named Main Menu, or edit the Navigation block.
  2. Add Home, About Us, Services, Courses, and Contact Us.
  3. Arrange the items in a suitable order.
  4. Create a dropdown under Courses.
  5. Add Web Development and Computer Applications as submenu items.
  6. Add a custom link if needed.
  7. Display the menu in the appropriate location or header.
  8. Save the changes.
  9. Test the menu on desktop and mobile.

14. Lesson Summary

  • A navigation menu helps visitors move around a website.
  • Classic themes commonly use Appearance → Menus.
  • Block themes commonly manage navigation through the Site Editor.
  • Menus can contain pages and custom links.
  • Dropdowns organize related links beneath a parent item.
  • Menu display locations depend on the active theme.
  • Removing a menu item does not delete the associated page.
  • Navigation should be tested on desktop and mobile devices.

Lesson 12 Quiz: Menus and Navigation

Select the correct answer for each question.

1. What is the main purpose of a navigation menu?

2. What is a dropdown menu used for?

3. What happens when you remove a page link from a menu?