How to add an onclick popup on menu item?

There are 2 methods to include Onclick popup inside the menu link.
1) Using standard WordPress method

  • Go to your WP admin panel
  • Go to Appearance->Menus

  • At the upper right corner of the Page you will see "Screen Options" DropDown menu, click on it and check "CSS Classes" option.

  • You will see CSS Classes (optional) option

  • Add our class 'sg-popup-id-1' where id-1  is a popup id.

2) Using 3-rd party shortcode plugin
You can use 3rd party plugin which will allow you to use shortcodes inside the menu item.
Please follow the steps to get it done:

  • Install the following plugin
  • Check this screenshots to activate shortcodes panel
  • Add our shortcode like this [sg_popup id="1" event="click"]Your text[/sg_popup]