Tagged: , ,

Viewing 15 posts - 1 through 15 (of 15 total)
  • Author
    Posts
  • #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

    #1005492

    Hey 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,
    Dude

    #1005496

    Hey 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,
    Victoria

    #1005848

    I’m trying to add mailchimp subscriber popup

    Please help how to do it

    #1005863

    Hi 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?

    #1005981

    Hi reyatmadi,

    Please find the script in private, make sure to copy from pastebin to not get the weird quotes.

    Best regards,
    Victoria

    #1005982

    Hi scottgroves73,

    Is the code just meant for one page? What code are you trying to add?

    Best regards,
    Victoria

    #1006045

    I 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 working

    Please advise

    #1006225

    Hi reyatmadi,

    You need to put the code to the functions.php file in the child theme.

    Best regards,
    Victoria

    #1006882

    Where should I put it in functions.php ?? Or functions-enfold.php ??

    #1006934

    Hi,

    Please try it in functions.php in your child theme.

    Best regards,
    Rikard

    #1006954

    I added the script at the bottom of function.php

    Still not working. Please advise

    #1006972

    Hey!

    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,
    Peter

    #1007003

    Did you also deactivated a lot of our plugins?

    #1007428

    Hey!
    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

Viewing 15 posts - 1 through 15 (of 15 total)
  • You must be logged in to reply to this topic.