Disable Aweber form popup on a specific page

59 views Asked by At

Hi can anyone help me disable or block Aweber form popup in two of my Wordpress page. By default this code is site wide and put under my footer.php.

<div class="AW-Form-306596914"></div>
<script type="text/javascript">(function(d, s, id) {
    var js, fjs = d.getElementsByTagName(s)[0];
    if (d.getElementById(id)) return;
    js = d.createElement(s); js.id = id;
    js.src = "//forms.aweber.com/form/14/306596914.js";
    fjs.parentNode.insertBefore(js, fjs);
    }(document, "script", "aweber-wjs-2vvzoocrg"));
</script>

Can I just put a CCS code on the page to disable the pop up or I need to edit the code itself?

Here's the two pages:

https://www.ataonline.edu.au/unlock-free-ebook-for-australia/
https://www.ataonline.edu.au/unlock-free-ebook-international/

I hope you can give me some idea on this. Thanks in advance!

1

There are 1 answers

0
Vel On

Add this condition

<?php if(!is_page('2870') && !is_page('2853')) { ?>

    <div class="AW-Form-306596914"></div>
    <script type="text/javascript">(function(d, s, id) {
        var js, fjs = d.getElementsByTagName(s)[0];
        if (d.getElementById(id)) return;
        js = d.createElement(s); js.id = id;
        js.src = "//forms.aweber.com/form/14/306596914.js";
        fjs.parentNode.insertBefore(js, fjs);
        }(document, "script", "aweber-wjs-2vvzoocrg"));
    </script>

<?php } ?>