Tagged: popup
-
AuthorPosts
-
May 31, 2023 at 11:44 am #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!
May 31, 2023 at 12:36 pm #1409136Hey 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,
MikeMay 31, 2023 at 12:55 pm #1409137Many thanks for your quick response. I’ll give it a go.
May 31, 2023 at 5:35 pm #1409158June 1, 2023 at 12:29 am #1409209Unfortunately it didn’t seem to work.
June 1, 2023 at 12:44 am #1409213I 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.
June 1, 2023 at 5:36 pm #1409292Hi,
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,
MikeJune 2, 2023 at 1:19 am #1409337Mike 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.
June 2, 2023 at 5:31 pm #1409418Hi,
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,
MikeJune 3, 2023 at 12:18 am #1409453Hi 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.June 4, 2023 at 2:50 am #1409507Hi,
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,
MikeJune 4, 2023 at 5:05 am #1409515Mike 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.
June 4, 2023 at 1:23 pm #1409536Hi,
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,
MikeJune 5, 2023 at 1:20 am #1409586Mike 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.June 5, 2023 at 12:07 pm #1409617Hi,
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,
MikeJune 9, 2023 at 10:18 pm #1410095Hi 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
IvanaJune 9, 2023 at 10:41 pm #1410097Hi,
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,
MikeJune 10, 2023 at 2:07 am #1410108Mike 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
IvanaJune 10, 2023 at 12:15 pm #1410139Hi,
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,
MikeJune 11, 2023 at 1:43 am #1410203I 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.
June 11, 2023 at 1:20 pm #1410220Hi,
Thanks for sharing the feedback, I guess there isn’t anymore we can do on this end, shall we close this then?Best regards,
MikeJune 12, 2023 at 1:53 am #1410301Yes of course, you can close this thread.
June 12, 2023 at 5:12 am #1410304Hi,
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 -
AuthorPosts
- The topic ‘Disabling popups’ is closed to new replies.