Doubt about dropdown menu WORDPRESS

Asked

Viewed 54 times

1

I’m developing a website on wordpress and in the menu I have an item that is dropdown as follows the example:

  • HOME
  • COURSES
    • CURSO1
    • CURSO2
  • OVER

But I wanted the user not to be redirected to another page if he accidentally clicked on COURSES, instead of clicking on one of the submenus.

How can I do that?

1 answer

1


Depending on your Wordpress theme this is customizable in the theme customization menu itself.

But that aside, you can use one of the following alternatives:

  1. Change the item link Cursos, that is in the menu, to redirect p/ to URL #, so when clicking it will not be redirected p/no other link

  2. Add a specific class p/ this menu item, and use some code in jQuery or a equivalent in PHP p/ remove links

  3. Use the plugin "Disable Parent Menu Link" or create your own, with similar functionality

  4. Define the href of 'non-clickable' items such as javascript:void(0)

Browser other questions tagged

You are not signed in. Login or sign up in order to post.