How to change the Click Event Behaviour for a single location

The “Click Event Behaviour” option (previously called “Second Click Behaviour”) is set for each menu location individually, so no code is needed to change it for a single location.

Go to Mega Menu > Menu Locations, click the menu location you want to change and go to the Advanced tab. The “Click Event Behaviour” option has three settings:

  • First click will open the sub menu, second click will close the sub menu.
  • First click will open the sub menu, second click will follow the link.
  • First click will follow the link (the arrow must be used to toggle sub menu visibility).

This option applies when the Event is set to “Click”, and also to the mobile menu.

Using code

If you prefer to set the behaviour in code, add the following to your theme’s functions.php file: