Last Updated on October 18, 2019 by Dave McLean
Every now an again you may want to add a menu item with no link to your WordPress main menu. This is quite common when you have parent menu items that contain submenus, but a link for the parent menu item is not required.
Making a menu item in WordPress that doesn’t have a link sounds like a very simple thing to do. But there is a little, not so obvious trick you need to pull off to make it happen. Here’s how you can do it in a few easy steps.
Make your way to menus section
This is a simple step to start off with. Once you are logged into the admin area of your website, go to Appearance > Menus.
Add a new menu item to your menu
The next thing we need to do is create a menu item for your menu. When menu items are first created WordPress requires that each menu item links to something. The information that is added to the link field of the new menu item can be anything and doesn’t need to be a working link. Let’s start by making the menu item that will eventually have no link.
First things first, you should see a column on the left of the page that says Add menu items. In this column, there is a menu item type called Custom Links. What this section does is let us create a menu item with a custom link, rather than using an existing page or post. Click on this section.
The Custom Links section should now be expanded, and showing the fields URL and Link Text. The text content in the Link Text field is what appears on the front end of the website. In my example, I’ll have this say No Link (sorry Link from Zelda, you aren’t wanted here!). For the URL field, you can put in anything you likely. In my example, I’ll simply put use #.
Once these steps are completed click the Add to Menu button. This will add the new menu item to your chosen menu. Next click on the blue Save button in the top right or bottom right corner of the page to save your changes to the menu.
Click image to enlarge
Remove the link in your new menu item
Remember the # we added to the menu item to be used as its link? It’s now time to remove it.
What we want to do is edit the new menu item. You should be able to see your new menu item in the Menu structure part of the page. click on this to expand it and show its current configuration. The URL should still be # and the Link Text should still be what you typed in this field earlier. For me, it still says No Link.
All you need to do now is to remove the # from the URL field, and then save the changes to the menu again by pressing the blue Save Menu button.
Nicely done! You now have a menu item that doesn’t link to anything. Now when you view your website and hover over your new menu item, you shouldn’t be able to click on it and be taken to another page.
In conclusion
It’s a little bit annoying that you need to take an extra couple of steps to add a menu item in WordPress with no link. But luckily, the extra steps to create the non-linked menu item is easy to do. It’s just that WordPress doesn’t make it very obvious how to do it.
I hope that this tutorial has been useful. If there is anything that I missed out in this tutorial leave a comment in the comments section below. And as always, have fun tinkering around with WordPress and making awesome WordPress websites!
Check out some of my other WordPress tutorials and tips, and see what else you can do to improve your WordPress website.