-
AuthorPosts
-
September 4, 2018 at 12:14 pm #1005474
I used to have mailchimp popup screen generated from mailchimp in
Just realized that the popup no longer working. I checked <head> and the script is missing. Tried to add it back adding it to enfold header.php but still not working.
Tried using plugin to add script to header also not working.
Please advise
September 4, 2018 at 12:43 pm #1005492Hey reyatmadi,
Please check if a plugin breaks your script. If it worked before it’s very likely a plugin script conflicts with your code.
If not please give us more details. Where can we find the code? How should it work? Where can/should we see the popup?
Best regards,
DudeSeptember 4, 2018 at 12:47 pm #1005496Hey reyatmadi,
What is the script you’re trying to add?
If you want the code to stay in the header.php or functions.php you need to have the child theme.
Best regards,
VictoriaSeptember 5, 2018 at 3:22 am #1005848I’m trying to add mailchimp subscriber popup
Please help how to do it
September 5, 2018 at 4:50 am #1005863Hi All,
I’ve had the same issues with Mailchimp popup today.I’ve tried adding it with <codeblock> element in Enfold. It’s not showing.
In addition, another issue is it’s conflicting with other elements.
i.e. Animated numbers stop working. Google maps stop showing. Image sliders stop working.Mailchimp popup contains 2 x <script> – naturally we could add to header.php via child theme etc – but if we want it on individual pages we need to use element like CODEBLOCK.
Any ideas?
September 5, 2018 at 10:44 am #1005981Hi reyatmadi,
Please find the script in private, make sure to copy from pastebin to not get the weird quotes.
Best regards,
VictoriaSeptember 5, 2018 at 10:45 am #1005982Hi scottgroves73,
Is the code just meant for one page? What code are you trying to add?
Best regards,
VictoriaSeptember 5, 2018 at 11:39 am #1006045I have tried to add that code from the pastebin as you instructed into the header.php whilst making the sure the code is inside <head></head> tag
It worked but the code line
add_action('wp_head', 'av_add_mailchimp_popup'); function av_add_mailchimp_popup() {
is visible at the top of the page and the full width easy slider at the top of the page and the testimonial slide at the bottom of the page not workingPlease advise
September 5, 2018 at 5:35 pm #1006225Hi reyatmadi,
You need to put the code to the functions.php file in the child theme.
Best regards,
VictoriaSeptember 7, 2018 at 4:55 am #1006882Where should I put it in functions.php ?? Or functions-enfold.php ??
September 7, 2018 at 6:52 am #1006934September 7, 2018 at 8:29 am #1006954I added the script at the bottom of function.php
Still not working. Please advise
September 7, 2018 at 9:28 am #1006972Hey!
I fixed it by using the code from here: https://gist.github.com/nickcernis/3df74c0c6c18b75cb951 – this seems to be an incompatibility issue with wordpress. I added this code to the functions.php:
function avia_custom_head_javascript() { ?> <script> // Fill in your MailChimp popup settings below. // These can be found in the original popup script from MailChimp. var mailchimpConfig = { baseUrl: 'mc.us8.list-manage.com', uuid: '8e6cb1cf9675fdb6769c3732e', lid: 'eea4db8087' }; // No edits below this line are required var chimpPopupLoader = document.createElement("script"); chimpPopupLoader.src = '//s3.amazonaws.com/downloads.mailchimp.com/js/signup-forms/popup/embed.js'; chimpPopupLoader.setAttribute('data-dojo-config', 'usePlainJson: true, isDebug: false'); var chimpPopup = document.createElement("script"); chimpPopup.appendChild(document.createTextNode('require(["mojo/signup-forms/Loader"], function (L) { L.start({"baseUrl": "' + mailchimpConfig.baseUrl + '", "uuid": "' + mailchimpConfig.uuid + '", "lid": "' + mailchimpConfig.lid + '"})});')); jQuery(function ($) { document.body.appendChild(chimpPopupLoader); $(window).load(function () { document.body.appendChild(chimpPopup); }); }); </script> <?php } add_action('wp_head', 'avia_custom_head_javascript');
Best regards,
PeterSeptember 7, 2018 at 9:54 am #1007003Did you also deactivated a lot of our plugins?
September 8, 2018 at 3:22 pm #1007428Hey!
Maybe I deactivated some to check if there’s a script conflict. Otherwise it’s difficult to debug why the popup script doesn’t fire. I’m sorry if this caused any problems.Cheers!
Peter -
AuthorPosts
- You must be logged in to reply to this topic.