How to create a non-linking parent item in a WordPress menu

We are often asked how to create specific functionality with WordPress. Although WordPress is an amazing platform, and has lots of great features, there are some things that aren’t necessarily too intuitive.

One example is creating parent items in a custom menu that don’t link to a page. For instance, in the menu here on WP SuperGeek, we have a parent item called “Become Fearless” that doesn’t link to a page – rather, it just serves as a heading for the child menu items underneath it:

FinishedMenu

To achieve this functionality in WordPress, you’ll need to do a small but effective trick when managing your custom menu. Here are the steps:

1. Go to the Menus editor

In your WordPress admin, navigate to Appearance>Menus:

Menus

2. Add the parent item

Once you are in the Menus screen, click on the “Links” heading on the left-hand side to add a new link. Type any URL into the “URL” field (or you can just use the hash/pound sign #) and the text you want to appear in the menu in the “Link Text” field. Click “Add to Menu.”:

AddNewLink

3. Open the link details

Once your link is added, it will appear at the bottom of your menu. Open up the details by clicking the disclosure triangle to the right of the heading:

LinkAdded

 

 

4. Remove the link and position the item

You can then remove the URL or hash/pound sign so the item won’t link to anything. Then, drag the menu item to the appropriate place in your menu. You can then add the child items underneath it:

RemoveURL

 

5. Save your super work

Click “Save Menu,” and you’re done!

Did this help you achieve the menu functionality you wanted? Let us know in the comments!

Leave a Reply