Tagged: 

Viewing 23 posts - 1 through 23 (of 23 total)
  • Author
    Posts
  • #1409129

    I was wondering if anyone would know how to disable GetResponse popups on 2 pages of my website. I contacted GetResponse to get their help and they said I can specify which pages I want the pop up to appear on, but there is no way to specify pages I DON’T want it to appear on. The problem is I have 400+ pages on my website. GetResponse suggested there may be a code I can add to my website to those two pages, which would prevent the pop up from displaying, but I am not sure how to do that.

    I would appreciate any help with Quick Code I could add to Enfold to stop the 2 pages (links below) from showing up.

    Thank you!

    #1409136

    Hey Ivana,
    Thanks for the link to your pages, Try adding this code to the end of your child theme functions.php file in Appearance ▸ Editor:

    function disable_getresponse_popups() { ?>
      <script>
    (function($){
      $('#top.page-id-31420,#top.page-id-11481').each(function() {
      $( this ).find('div[data-gr="popup-container"]').remove();
      });
    })(jQuery);
    </script>
      <?php
    }
    add_action('wp_footer', 'disable_getresponse_popups');

    then clear your browser cache and check.

    Best regards,
    Mike

    #1409137

    Many thanks for your quick response. I’ll give it a go.

    #1409158

    Hi,
    Please let us know if this worked for you.

    Best regards,
    Mike

    #1409209

    Unfortunately it didn’t seem to work.

    #1409213

    I don’t have a child theme on this website :) But I first added it to the functions.php file then tested it, it didn’t work and the pop up came up and later I tried adding it to functions-enfold.php and tested it and the pop up came up again.

    #1409292

    Hi,
    If you are not using a child theme I recommend the WPcode plugin for your customizations so they will not be lost when you update the theme. The above script seems to work in my tests but try installing the plugin and include an admin login in the Private Content area so we can check and adjust if needed.
    Please ensure to copy the code from the forum and not an email notification so the symbols are not converted.

    Best regards,
    Mike

    #1409337

    Mike thank you so much for your help. I greatly appreciate it. I recently had someone optimise my website for speed and it seems he installed a plugin called “Code Snippets” so rather than installing another plugin, I added the code you recommended and the popup came up on both pages. I have set up login below and would be so grateful if you could look at it for me as it is beyond my technical understanding.

    #1409418

    Hi,
    Thanks for the login I adjusted the script in your Code Snippets plugin and it seems to work now, please clear your browser cache and check.

    function disable_getresponse_popups() { ?>
      <script>
    
    (function($){
      $('#top.page-id-31420,#top.page-id-11481').each(function() {
    	  setTimeout(function () {
      $( this ).find('.byZbzq').remove();
    	  }, 500);
      });
    })(jQuery);
    
    </script>
      <?php
    }
    add_action('wp_footer', 'disable_getresponse_popups');

    Best regards,
    Mike

    #1409453

    Hi Mike
    I really appreciate your help on this, but it doesn’t seem to have worked. I’ve recorded a video after clearing the cache several times and even restarting my computer. Please see below.

    #1409507

    Hi,
    Thanks for the feedback, I found that the popup only shows a certain number of times, so the last two times after testing a dozen or so times when it stoped showing I thought I had found a solution. This is trickly the div that the popup is in is added as a shadow-root with the css so you can’t just add css to block it, I think they make it tough so ad blockers can’t block it.
    The popups are added by the code snippet that was in your Head, Footer and Post Injections plugin so I removed the snippet and added it to this snippet where it says //Put Your Tracking Code Here, this code excludes the snippet from showing on any page in the array by page ID:

    function exclude_certain_pages_from_getresponse_popup(){
      if( ! is_page(array(31420, 11481))) {
    ?>
    //Put Your Tracking Code Here
    <?php
      }
    }
    add_action('wp_head', 'exclude_certain_pages_from_getresponse_popup');

    I won’t post your full code here, but you can see it in your Code Snippets plugin.
    Please clear your browser cache and check.
    Best regards,
    Mike

    #1409515

    Mike you are a star! Thank you for your help. The popup no longer shows up. Unfortunately now the inline form which is meant to display at the top and also at the bottom of each page (next to the image of the ebook) has also disappeared.

    #1409536

    Hi,
    You are correct, in my excitement I didn’t notice this, so it seems your forms and your popup are created with the same snippet from getresponse, and I don’t see a way to either remove the popups on certain pages or only show the form on certain pages, so I would advise to create two campaigns, if this is what getresponse calls them, one for the popups only so that you have a code snippet to use in the function I created and another for your forms that will use a different snippet on all of your pages that you can add to your Head, Footer and Post Injections plugin like before. I realize this may not be what you want, having two lists or campaigns, but I don’t see another option since getresponse is not giving you this option.
    Perhaps you could hire someone with better javascript skills on Upwork that can remove the popups on those pages, if so I would like to see the solution because I tried a lot of different ways and I’m out of ideas :)

    Best regards,
    Mike

    #1409586

    Mike I really appreciate all your help. You have gone above and beyond.
    The inline form is linked to a different campaign than the popup form, so I may need to find another solution.
    I will let you know if/how the problem gets resolved.
    Thanks again.

    #1409617

    Hi,
    Thank you, what I was tring to say is that the inline forms and the popups seem to be added by the same code snippet from getresponse, if there was a way to have two code snippets, one for the inline forms that we could add to the header for all pages, and one snippet for the popups that we could use in the “exclude_certain_pages_from_getresponse_popup” function above to only show on some pages, I believe this would work.

    Best regards,
    Mike

    #1410095

    Hi Mike

    I have contacted GetResponse to see if they can offer a solution and am waiting for their response. However, in the meantime I have removed the code from the snippets, so I can show GetResponse exactly what is happening. But for some reason, the forms are not showing up at all on those two pages. Did you make changes elsewhere that need to be removed?

    Many thanks
    Ivana

    #1410097

    Hi,
    After removing the snippet you need to add the GetResponse code back into your Head, Footer and Post Injections plugin, I did this for you and now the popups are working. Please clear your browser cache and check.

    Best regards,
    Mike

    #1410108

    Mike I don’t know how to thank you. You’ve been so incredibly helpful and I really appreciate it.

    It’s difficult to navigate the online world without coding skills, so I am very grateful for your support.

    Cheers
    Ivana

    #1410139

    Hi,
    Glad to help, we will leave this open to hear back from you when you find a solution from either GetResponse or perhaps a freelance javascript coder, I imagine there will be other users in the same situation as you.

    Best regards,
    Mike

    #1410203

    I just got a response from GetResponse to say it is on their list of things to do, but they couldn’t tell me when it would be done. So I will think about whether to hire a coder or just specify my most popular 20 or so pages for the popup to show up.

    Again, many many thanks for your help Mike.

    #1410220

    Hi,
    Thanks for sharing the feedback, I guess there isn’t anymore we can do on this end, shall we close this then?

    Best regards,
    Mike

    #1410301

    Yes of course, you can close this thread.

    #1410304

    Hi,
    Glad we were able to help, if you have any further questions please create a new thread and we will gladly try to help you. Thank you for using Enfold.

    Best regards,
    Mike

Viewing 23 posts - 1 through 23 (of 23 total)
  • The topic ‘Disabling popups’ is closed to new replies.