The menu system introduced in WordPress 3.0 (seems like so long ago now) provides all sorts of easy ways to create custom menus with custom labels. One issue that many people find annoying is removing the link from a parent menu item in WordPress. For example, you may create a custom menu with parent menu items and sub-items underneath the parent items and may not want the parent item to be hyperlinked (i.e. ‘clickable’).
Of course we can create a menu items under ‘Links’ and use # as the URL. This means that the menu-item is still hyperlinked but doesn’t actually take the visitor to another Page. This can be annoying for your website visitors and they will expect that if they click a hyperlink they will be taken to some other content.
Instructions to remove WordPress menu item link
- From your WordPress Dashboard go to Appearance -> Menus.
- Choose your menu in the Select a menu to edit drop-down.
- Under Links type # in the URL field and your preferred text in the Link Text field.
- Click Add to Menu.
- Drag and drop your new menu item to wherever you want it to appear in the menu.
- Click the down-arrow next to the word Custom on the menu item we’ve created above.
- In the URL field remove #.
- Click Save Menu.
Why not insert an empty Link URL?
For some reason WordPress won’t allow adding a Link without something in the URL field. We therefore need to add something into the URL field, add the menu item and then delete the content of the URL field.
The solution above is simple, only takes a matter of seconds and, best of all, doesn’t require a plugin or any coding (by the way I’ve tested the above on various StudioPress Genesis themes) 🙂
Please see an update here.