Trigger a popup with popmake_popup_is_loadable
-
Hello,
I have a popup that is opened on clicks to a specific class.I would like to add another condition for the popup to show,
based on a querystring parameter.So, the popup should open if:
– someone clicks the right button
– someone visit the page using an url with the parameter pop=popup_idI used the popmake_popup_is_loadable filter and added to my theme functions.php this snippet
function my_popup_trigger( $is_loadable, $popup_id) { if ( isset( $_GET['pop']) && $popup_id == $_GET['pop']) { $is_loadable = true; } else { $is_loadable = false; } return $is_loadable; } add_filter('popmake_popup_is_loadable', 'my_popup_trigger', 1000, 2 );
clicking the class object (as setup in the popup options) works, but automatic open triggered by “pop” queryvar in URL does not.
Live site: tedlobsterburger.it
class that opens on click: .prenotawhere am I wrong?
- The topic ‘Trigger a popup with popmake_popup_is_loadable’ is closed to new replies.