HostOnNet Blog

How to make not clickable menu item in to your WordPress

Looking for Linux Server Admin or WordPress Expert? We can help.

Want to add a not clickable menu item to your WordPress menu?

Login to your WordPress admin dashboard and navigate to Menu Page. Check out the screenshot below:

On the menu page, click on the Custom Link section option. Check out the screenshot below:

In the Custom Link section you can enter any URL you like, but let’s give it a special trick here.

In the URL input, replace “http://” with a Hashtag sign “#,” then enter the text you want to enter in the Tink Text. Check out the screenshot below:

Click the Add to Menu button, then you can arrange it in your menu. Since no link is provided in the menu, visitors will click on this menu and it will not go to the new page.

We need to do one more step that is “Remove the pointer on hover”.

No links are provided in the menu, but they show the pointer cursor on hover. You must do one more thing to make it clear that this menu item is not clickable.

To do so, click on the Screen Option tab that appears in the top right of the menu page. Check out the screenshot below:

Make sure the CSS class is checked there, then close the screen option section. Check out the screenshot below:

Then click on the “unlinked menu” item, and add a css class named “not-clikable”. Check out the screenshot below:

The following CSS will make the cursor stay as the default icon when hovering over the unlinked menu item.

.not-clikable > a:hover
{
cursor: default;
}

This CSS code can be added to the Custom CSS.

About ramesh xavier

Hi I am Ramesh Xavier I have a passion for designing detailed, creative and modern websites, I have been working as web-designer for over 4 years, and have done lots of work over that time, I'm always keeping an eye on the latest trends over typography, shapes, colours, etc..
Posted in Wordpress

Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.