To get a navigation bar on WordPress, create a menu and place it in your header. On a block theme, add the Navigation block in the Site Editor (Appearance > Editor). On a classic theme, build the menu under Appearance > Menus and assign it to a theme location. Both take a few minutes and need no code.
Which route you follow depends on your theme, so the first step is to check which kind you have.
Block theme or classic theme?
Open Appearance in the admin sidebar.
- You see Editor. You are on a block theme. Menus are managed with the Navigation block, and the Menus screen is normally absent.
- You see Menus and Customize. You are on a classic theme. You build menus on the Menus screen and the theme decides where they appear.
The WordPress documentation notes that from WordPress 6.0, a block theme manages navigation through the Navigation block, while the Menus screen can still be available on classic or hybrid themes. Follow the section below that matches what you see.
Block themes: add a Navigation block
- Go to Appearance > Editor.
- Open the template or template part that holds your header. Many block themes have a Header template part you can open from the Patterns area.
- Click the block inserter, search for Navigation and add the block. You can also type
/navigationon a new line and press Enter. - If you have no menu yet, the block starts with a Page List block that shows your published pages and adds new ones automatically.
- Save.
Customize the menu items
The automatic Page List is handy but you cannot reorder it. To take control of the menu, select the Navigation block, select the Page List, and choose Edit in the toolbar. This turns the list into individual items. From then on, new pages are no longer added to the menu on their own.
- Add a page. Click the plus icon, type part of the page title and select it.
- Add a custom link. Click the plus icon, choose Add block, then Custom Link, and enter the URL.
- Create a dropdown. Select an item and choose Add submenu in the toolbar, or drag an item slightly to the right of another in the List View.
- Reorder. Use Move up and Move down in the toolbar, or drag items in the List View in the settings sidebar.
- Remove an item. Select it and delete it like any block. This does not delete the page.
Make it work on phones
In the block’s settings sidebar, the Overlay options control when the menu collapses into a menu icon: Off, Mobile or Always. Mobile is the usual choice. A full row of links does not fit on a narrow screen, and the icon opens the full menu on tap. You can also decide whether submenus open on hover or on click, which matters for touch devices because hover does not exist there.
Several menus and reuse
You can keep more than one menu. Each Navigation block shows one selected menu at a time. From the menu’s options you can switch to another menu, create a new blank one, or import a classic menu that already exists on the site. That import option appears only when classic menus are available, and it saves rebuilding a menu you made years ago.
Classic themes: build a menu on the Menus screen
- Go to Appearance > Menus.
- Choose Create a new menu, enter a name and click Create Menu.
- In the left-hand panes, tick the pages, posts, categories or custom links you want, then click Add to Menu.
- Drag items up or down to reorder them. Drag an item slightly to the right under another to make it a submenu item.
- Under Menu Settings, tick a Display location, for example Primary.
- Click Save Menu.
The locations on offer come from your theme. If your theme has none, you can add the menu with the Navigation Menu widget under Appearance > Widgets, as long as the theme has a widget area where you want the menu.
Some options are hidden by default. Open Screen Options at the top of the Menus screen to show tags, link target, CSS classes and descriptions for each item.
Preview before you commit
Classic themes also let you manage menus in Appearance > Customize > Menus, with a live preview of your site next to the controls. This is the safest way to test a new menu on a live site, because nothing goes public until you press Publish.
Where should the navigation bar go?
The top of the page is where visitors look first, so a horizontal bar in the header is the standard. A few rules keep it usable.
- Keep the main menu short. Aim for the handful of destinations that visitors actually need. Anything else can go under a dropdown or in the footer.
- Use plain labels. “Pricing”, “Blog” and “Contact” beat clever names that make people guess.
- Put the action you want first or last. A sign-up or shop link is easier to find at the end of the bar styled as a button.
- Do not nest too deep. Two levels is plenty. Three-level dropdowns are hard to use with a mouse and harder on a phone.
- Add a second menu in the footer. Legal pages, support and contact links work well there.
Style the navigation bar
On a block theme, use the block’s own Styles tab for typography, colors, spacing and layout. You can set a different color for the menu text, the submenu background and the overlay, and change item spacing under Dimensions. For justification, such as logo on the left and links on the right, use the layout controls on the block.
On a classic theme, styling usually comes from the theme’s options or the Customizer. For anything beyond that, use Additional CSS. This example gives a menu a bottom border and hover color (example code, check the class names your theme uses first):
.main-navigation {
border-bottom: 1px solid #e2e4e7;
}
.main-navigation a:hover,
.main-navigation a:focus {
text-decoration: underline;
}
Always keep a visible focus style. Visitors who navigate by keyboard need to see where they are.
Navigation for membership and community sites
A brochure site needs five links. A community site needs more: a feed, members, groups, messages and a profile menu, and some links should show only to logged-in users. That is a different job from a basic menu. Core WordPress handles the layout, and your theme or community plugin decides which items appear for which role. If you are planning a community, our guide to building an online community shows how the pieces fit together, and the community picker helps you choose a stack.
Plan the menu before you build it
Ten minutes on paper saves rework later. Write down every page you have, then sort them into the groups a visitor would expect: what you offer, how to buy or join, how to learn more, how to get help. Each group becomes either a top-level item or a dropdown with a few children.
Check your own site analytics or search box data if you have it. The pages people already visit most belong in the main bar. Pages that exist only for completeness, such as a privacy policy, belong in the footer menu. A menu that mirrors your internal org chart instead of your visitor’s questions is the most common reason people leave a site without clicking anything.
Accessibility and search engines
A navigation bar is more than links in a row. It is a landmark that screen reader users jump to, and WordPress menus output a <nav> element for that reason. Keep these points in mind.
- Use real links. Menu items should point to real URLs, not empty anchors, so search engines can follow them.
- Label repeated menus. If a page has a header menu and a footer menu, give each a clear name so assistive technology can tell them apart.
- Make tap targets big enough. On a phone, tight links are hard to hit. Test with your thumb, not a mouse.
- Keep the order logical. The tab order follows the page source, so the menu should come before the main content in the markup.
Fixing common navigation problems
- The menu does not show. On a classic theme, confirm a Display location is ticked and saved. On a block theme, confirm the Navigation block sits inside the header template part and that you saved it.
- New pages do not appear. You converted the Page List to individual items, so new pages must be added by hand. Or you assigned the menu but the page has not been published.
- The Menus screen is missing. You are on a block theme. Use the Navigation block in the Site Editor.
- The mobile menu is broken. Check the Overlay setting on a block theme. On a classic theme, deactivate plugins one at a time to find a script conflict.
- Dropdowns close too fast. Switch submenu visibility to click, or add a small hover delay in CSS.
- Old edits keep returning. Clear any caching plugin and the CDN cache, then reload.
Frequently asked questions
How do I add a navigation bar in WordPress?
On a block theme, add a Navigation block to the header in Appearance > Editor. On a classic theme, create a menu in Appearance > Menus and assign it to a display location such as Primary.
Why is there no Menus option under Appearance?
Your active theme is a block theme. Block themes manage menus with the Navigation block inside the Site Editor, so the Menus screen is not shown by default.
Can I use my old menu in a block theme?
Yes. In the Navigation block’s menu options, choose Import classic menus. The option only shows when classic menus exist on the site.
How do I make a dropdown menu?
On a block theme, select an item and choose Add submenu, or drag an item under another in the List View. On a classic theme, drag the item slightly to the right under its parent on the Menus screen.
How do I make the menu collapse on mobile?
In a block theme, set the Navigation block’s overlay option to Mobile. Classic themes handle this in their own design, so check the theme options or its documentation.
Will a new page appear in my menu automatically?
Only if the menu is still an automatic Page List on a block theme. Once you edit the items individually, or on a classic menu, you add new pages yourself.
Do I need a plugin for a navigation bar?
No. Both menu systems are part of WordPress core. A plugin is only worth adding for extras such as mega menus or role-based visibility.
See a working navigation
To see how a menu behaves on a full site, with a header, member links and a mobile layout, open the Reign demos. If you are building a community site, the community build guide walks through the setup, and what Reign is explains the theme behind the demos.