Add popup in menu

Please follow these steps  :

1. Create a popup and note down the popup id.
Refer : https://www.youtube.com/watch?v=81_ClyzNgMQ

2. Now goto wp-admin ->appearance ->menus .Select a menu to edit .Add a custom link menu item .

3. Add the following in the label field of the custom menu item :

<a class=”popup-with-zoom-anim ajax-popup-link default” href=”your-site.com/wp-admin/admin-ajax.php?ajax=true&amp;action=vibe_popup&amp;id=2353” id=”anchor_popup_2353“>

Note that here ” 2353 ” is your popup id and ” your-site.com ” is your site url .

4. Add a custom class also in the class field and note this custom class you give .Save the menu .

5. Now goto appearance ->customize -> custom css and add the given css  :
.pop_menu_item > a {
display: none !important;
}

Note that here  ” .pop_menu_item  ”  is the custom class that you have given in the menu item .

That’s it you will have a new menu item and which will open popup .

 

Leave a Reply

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