Code to block popover from loading

Hi guys,

I spent a couple of hours searching for an answer and had to give up, because seems like I’m the only one who has this kind of problem.

The thing is that I would like to stop pop-over (optin form) from loading on some pages (squeeze page,review pages etc.) and can’t find a way to do that. We are talking about wordpress blog here…

Is there a some kind of script or code I can use? Should be, it’s not a rocket science. Just want to kill the process on some pages…

I’m using popup domination ( http://www.popupdomination.com/ )

Thanks!

How did you add the javascript originally?

You’d normally just need to strip out the <script> tag that controls the popup.

Can you please tell me how to do that?

Welcome to Sitepoint!

The obvious solution is to remove the javascript function from the pages where you don’t want the popup… or only include it on the pages you do want it.

I’m using popup domination, so it does everything automatically. Found some information from other forum, but something is wrong with this script, they provided.

Here’s what I have tried to use, but when I use it, I see the same script just above the header of my website and it’s in admin section as well (I put it in functions.php) :

function deregister_popupdomination() {
if (is_page(array(‘privacy-policy’,'contact-us’,about-us’))) {
wp_deregister_script( ‘popup_domination’);
}
}
add_action( ‘wp_print_scripts’, ‘deregister_popupdomination’, 200);

remove_action(‘wp_head’,'postTabs_addCSS’);