Skip to content
WordPress Guide

How to Add a Custom Link to a WordPress Menu

How to put any address in your WordPress menu, link to a section of a page, and decide when a menu link should open in a new tab.

A bright home office desk with a laptop and a monitor
8 sections · 7 min read
In this article · 8 sections

Not everything you want in the menu is a WordPress page. The booking system lives on another site. The price list is a section halfway down the home page. The shop is on a separate platform, and the menu needs to send people there with one tap.

For all of these you add a custom link to a WordPress menu: an item that points at any address you type, rather than a page picked from a list. The steps differ a little between classic and block themes, and two details, section links and new tabs, cause most of the questions. It works the same in a header or a footer menu; our guide to WordPress headers, footers and menus shows where each menu is edited. If you are still building the menu itself, start with creating a menu in WordPress and come back here.

  • Another website. A booking tool, an online shop on another platform, a supplier’s catalogue, your profile on a marketplace.
  • A section of a page. The contact form at the bottom of the home page, the FAQ on a service page.
  • Something the menu screen does not list. A filtered shop page, a page with a tracking parameter, a file such as a PDF menu or brochure.
  • A phone number or email address. A link that starts with tel: or mailto: rather than https.

For your ordinary pages, use the normal page picker instead. A menu item created from a page follows that page if you later change its address. A custom link is just text, so it keeps pointing at the old address until you edit it.

  1. Go to Appearance → Menus. If the site has several menus, pick the one you want to change with the selector at the top and click Select.
  2. On the left, open the Custom Links panel.
  3. In URL, paste the full address, including https:// for another site.
  4. In Link Text, type the words visitors will see in the menu.
  5. Click Add to Menu. The item appears at the bottom of the menu structure on the right.
  6. Drag it to the position you want. Dragging it slightly to the right under another item makes it a sub-item.
  7. Click Save Menu.

You can open any item later with the small arrow on its right to change the URL, the label, or remove it.

To add a custom link to a WordPress menu in a block theme, you work on the Navigation block in the Site Editor.

  1. Go to Appearance → Editor and open Navigation, or open the header and select the Navigation block inside it.
  2. Click the plus button at the end of the menu items to add a link.
  3. In the search box that appears, paste the address instead of searching. Press Enter to add it.
  4. Click the new item and type the label you want. By default it may show the address itself.
  5. Drag it into place in List View, then Save.

The link options, opened by clicking the item and then its link or edit button, hold the address and an option to open in a new tab. The block settings on the right also show the label and, in recent versions, a description field.

Linking to a section of a page

A menu item can jump straight to a heading or block partway down a page. This needs two parts: a name on the destination, and a link that uses it.

  1. Open the page in the block editor and select the heading or block you want to jump to.
  2. In the block settings on the right, open Advanced and type a short name in HTML anchor, such as prices or contact-form. Use lower case and hyphens, no spaces. Update the page.
  3. Add a custom link to the menu with the page’s address followed by a hash and the anchor, for example /services/#prices.

Use the full path rather than only #prices. A link that is only the hash works on that one page, but from any other page it goes nowhere. With the path included, visitors on any page are taken to the right page and then to the section.

If your site has a fixed header, the section heading can end up hidden behind it after the jump. Our guide to the sticky header and its trade-offs covers that.

Page builders have their own anchor setting. In Elementor, for example, a widget’s Advanced tab has a CSS ID field that does the same job.

In a classic theme, the option is hidden by default. On the Appearance → Menus screen, open Screen Options at the top right and tick Link Target. Each menu item then shows an Open link in a new tab checkbox. The same panel can reveal a few other optional fields for each item, which most owners can leave hidden.

In a block theme, the setting is in the link options of the Navigation item.

Use new tabs sparingly. For links to your own pages, opening a new tab confuses people, especially on phones, where tabs are less visible and the back button stops working as expected. It is more reasonable for links that leave your site, such as a booking tool, and even then many sites leave the choice to the visitor. If you do open a new tab, it helps to say so in the label or to use an icon that signals it.

Labels people understand

The Link Text, which WordPress calls the Navigation Label once the item is in the menu, is the only thing most visitors read. A few habits help:

  • Say where the link goes. “Book an appointment” is clearer than “Online system”.
  • Keep it short enough to fit on one line on a laptop. Long labels push the menu onto two lines or into the mobile menu early.
  • Do not rely on the Title Attribute field for important information. It shows only as a hover tooltip, which phone users never see.
  • Use the same word for the same destination everywhere. If the menu says “Shop”, the button on the home page should not say “Store”.

What can go wrong, and how to undo it

  • The link opens the staging site or an old domain. Copying an address from a test copy of the site is easy to do. Use relative paths such as /services/ for your own pages, or check the domain carefully.
  • The page moved and the link broke. Custom links do not follow page changes. After changing a page’s address, check the menu. A broken link checker scan picks up links like this across the site.
  • The item does not appear on the site. Usually the menu is saved but not assigned to a location, or a cache is showing an old copy. Our guide to a WordPress menu that is not showing goes through the checks.
  • The external site changed its address. Other sites move pages without telling you. Click each external menu link every few months.

Removing a custom link is safe: open the item, click Remove, save. Nothing else in WordPress depends on it. If you might want it back, copy the address first so you can re-create it in a minute.

If you are working through the menu as part of a wider tidy-up, our guide to managing a WordPress website lists the other jobs worth doing at the same time.

Frequently asked questions

Can I add an email address to the menu?

Yes. Add a custom link whose URL is mailto: followed by the address, with no space. A click hands the address to whatever mail program the device uses. Plenty of office and library computers have none configured, in which case nothing useful happens, so a contact page link is the safer menu item.

A custom link stores the exact address you typed and does not know the page has moved. Edit the menu item and enter the new address. If the old address has been redirected to the new one the link will still work, but updating it avoids an extra hop.

Yes. Upload the PDF to the Media Library, copy its file URL from the attachment details, and use that as the custom link address. Label it so people know a file will open, for example Price list (PDF). If you later replace the file, check that the address has not changed.

Not normally. Links to your own booking tool, shop or social profiles are ordinary links you stand behind. The Link Relationship field on the classic menu screen lets you add rel values if you need to, but most business menus never use it.

Custom themes and builder headers sometimes hide the menu settings altogether. When that happens, our WordPress support team can add the link for you and check the rest of the menu while they are in there.

Next in this series: WordPress Mobile Menu: How It Works and How to Set It

Is Your Website Working Properly?

Get a free website health check from WebMaintor. We'll review your website's speed, security, forms, and technical health — and tell you exactly what needs attention.

No obligation. No automated reports. A real review by our team.