Add a non-linking navigation button to your WordPress main menu – There are many occasions when you need a parent button in your menu bar that opens a sub-menu and you want the parent button to be non-linking. This is very easy to achieve in WordPress.
Let’s take a quick look to see how this is done using this site as an example.
There’s also a short video at the bottom of this page that walks you through the process.
Take a look at the main menu here.
You’ll notice that the ‘Books’, ‘Courses’ and ‘Tools’ nav buttons don’t go anywhere. Their only function is to launch a sub-menu when you hover over them.
This is how you create those non-linking buttons.
Login to your WordPress dashboard as normal and go to the left-hand sidebar. Hover over the ‘Appearance’ link and a fly-out menu will appear beside it.
Click on ‘Menus’ in the fly-out menu and create a new button using ‘Custom Links’.
Click on the disclosure arrow at the right of the ‘Customer links’ panel to open up button options. In the URL field highlight the HTTP pre-populated text and replace with # (option 3 on a Mac keyboard).
Name the button in the ‘Link Text’ field and click on the ‘Add To Menu’ button.
Now you can add active buttons below the parent you’ve just created using the ‘Pages, ‘Posts’, ‘Custom Links’ and ‘Categories’ options. Drag them to the right immediately below the parent button to nest them as sub-menu buttons. The parent will open the sub-menu but will not link to any other element on your site.
Here’s the video