How to Create and Edit a WordPress Menu
Build navigation that works in both classic and block themes: create the menu, add pages, custom links and submenus, control what opens in a new tab, and style it without breaking updates.
Quick version: in a classic theme, go to Appearance → Menus, create a menu, tick the pages you want, drag them into order, assign a theme location and save. In a block theme, edit the Navigation block inside the header template part under Appearance → Editor.
Both paths are covered below, because most sites end up using one or the other and the screens look nothing alike.
Create a menu in a classic theme
- Go to Appearance → Menus.
- Click create a new menu, give it a name that describes its position — "Primary", "Footer" — and click Create Menu.
- In the left panel, expand Pages, tick the pages you want and click Add to Menu.
- Drag items into the order you want.
- Under Menu Settings, tick the theme location.
- Click Save Menu.
Name menus by location, not by content. "Main navigation" stays accurate after you change the links; "Home About Contact" does not.
Add things other than pages
The left panel holds more than pages once you enable them:
- Posts — for a specific article you want in the navigation.
- Categories — for a section that keeps growing, so new posts appear without touching the menu.
- Custom Links — for external URLs, anchors,
mailto:addresses, or a link to a page that does not exist yet. - Tags and custom post types — hidden by default. Open Screen Options at the top of the screen and tick them.
Screen Options also unlocks the per-item fields most people cannot find: Link Target for new-tab behaviour, Title Attribute, CSS Classes and Description.
Build dropdown submenus
Drag an item slightly to the right and drop it underneath its parent. The indent shows the nesting level:
Services
Web design
SEO
Technical audits
About
Two rules worth respecting:
- Keep nesting to two levels. Third-level dropdowns are difficult on touch screens and many themes do not style them.
- Check that a parent item with children is still tappable on mobile. In some themes the parent only toggles the submenu, so if it also needs to be a destination, add it again as the first child.
Assign the menu to a location
A menu that is not assigned to a location renders nowhere. Under Menu Settings, tick the location, or use Manage Locations to see every slot the theme provides and what is currently in it.
The Automatically add new top-level pages checkbox does what it says. On most sites it produces messy navigation over time — leave it off and add pages deliberately.
If the menu still does not appear after saving, work through WordPress menu not showing.
Edit navigation in a block theme
Block themes handle navigation as a block, so there is no Menus screen by default.
- Open Appearance → Editor.
- Choose Patterns → Template Parts → Header (or open a template and select the header area).
- Click the Navigation block. The block toolbar lets you pick an existing menu or start a new one.
- Use the block's list view to add, reorder and nest links — nesting works by adding a Submenu block.
- Click Save and confirm which template parts you are saving.
The Navigation block also controls the mobile overlay, its breakpoint and its icon through the block settings sidebar. Layout, spacing and colours are set on the block rather than in CSS, which is the main practical difference from a classic theme. For the wider model, see what is a WordPress block theme.
Style menu items
Add a class to a single item using the CSS Classes field from Screen Options, then target it:
/* A call-to-action item, marked with the class "menu-cta". */
.menu-cta > a {
background: #1f6feb;
color: #fff;
border-radius: 6px;
padding: 0.5rem 1rem;
}
Put the rule in Appearance → Customize → Additional CSS or a child theme, never in the parent theme's stylesheet — see how to add custom CSS to WordPress for why that survives updates.
WordPress also outputs useful classes automatically: current-menu-item for the page being viewed, menu-item-has-children for parents, and current-menu-ancestor for a parent of the current page. Use those rather than inventing your own state classes.
Practical guidance
- Seven top-level items is about the point where navigation stops helping. Group the rest into sections.
- Put the most important destination first and the conversion action last; both positions get disproportionate attention.
- Label items by what the visitor wants, not by internal structure. "Pricing" beats "Commercial information".
- Check the menu on a phone before publishing. Long labels wrap badly and dropdowns behave differently under touch.
- If a menu with many items loses entries when you save, the server's
max_input_varslimit is truncating the request — ask your host to raise it.
Frequently asked
- Open Screen Options at the top of the Menus screen, tick Link Target, then expand the menu item and select the new-window checkbox. The option is hidden by default.
- As many as you like. The limit is how many locations the theme registers — typically a primary, a footer and sometimes a mobile or top-bar location.
- Yes. Add a Custom Link with the page URL plus the anchor, such as /about/#team, and make sure the target element has a matching id attribute.