How to Add On Click Popup on a Menu Item
It is possible to show a popup when any of the Menu items is clicked.
There are 2 possible ways to achieve the desired result.
Create any popup type and set the On Click event from the Events section.
Click on the Appearance from the WordPress Dashboard and select the Menus.
Add the Menu item from the left side.
Open the selected menu item from the right and choose the appropriate popup from the popup list by clicking on the Select a Popup option.
Press the Save Menu to save the settings.
Create the popup and from the Events section choose the Set by CSS Class event.
Open the Appearance from the WordPress Dashboard and click on the Menus. Right after, click on the Screen Options from the upper right side of the screen.
Check the CSS Classes option.
Select the Menu item from the right side and put the popup class into the CSS Classes (optional) section, right after Save Menu.
That's it.
Those were the steps to add the on click popup on a Menu item.
There are 2 possible ways to achieve the desired result.
Option 1
Create any popup type and set the On Click event from the Events section.
Click on the Appearance from the WordPress Dashboard and select the Menus.
Add the Menu item from the left side.
Open the selected menu item from the right and choose the appropriate popup from the popup list by clicking on the Select a Popup option.
Press the Save Menu to save the settings.
Option 2
Create the popup and from the Events section choose the Set by CSS Class event.
Open the Appearance from the WordPress Dashboard and click on the Menus. Right after, click on the Screen Options from the upper right side of the screen.
Check the CSS Classes option.
Select the Menu item from the right side and put the popup class into the CSS Classes (optional) section, right after Save Menu.
That's it.
Those were the steps to add the on click popup on a Menu item.
Updated on: 06/06/2022
Thank you!