WordPress – Make Top Level Menus without Creating Placeholder Pages

Add this little trick to the DUH category, one of those little things I should have looked up years ago. Very often with WordPress sites you want to create a menu bar based on categories, such as the one below.

Normally to do this you would setup a page or link for each menu item, both top level and sub-menus. But often we don’t want the top level to link anywhere, we simply want it to reveal the sub-menu. A placeholder of sorts.

Creating top level menus in WordPress that are inactive (not clickable)
Creating top level menus in WordPress that are inactive (not clickable)

In the past I did this by creating a blank page in WordPress, adding that page to the menu. The problem with this method is if the visitor clicks on the top level menu the blank page displays, not ideal.

The work around or trick is to add a “custom link” to the menu instead of a page. Then add a simple # symbol in the link field.

CustomLinkMenuWordpressThis does create a link, but it goes nowhere and in effect does what we want.

If for some reason you don’t see “Custom Links” under Appearance>Menus, you may need to click on “Screen Options” (top right) and turn on.

It’s the little things sometimes…

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *