Navigation
This is archived content. Visit our new forum.
  • Author
    Posts
  • #159274

    essenelight
    Participant

    Hello,

    I have created a popup form in my mailchimp account and I cannot get it to show up on my site. I am assuming I need to plug in the script code mailchimp gave me into the javascript box in the X customizer. However, I notice that it says not to include the script tags in the code. The code mailchimp gave me is:

    <script type=”text/javascript” src=”//s3.amazonaws.com/downloads.mailchimp.com/js/signup-forms/popup/embed.js” data-dojo-config=”usePlainJson: true, isDebug: false”></script><script type=”text/javascript”>require([“mojo/signup-forms/Loader”], function(L) { L.start({“baseUrl”:”mc.us9.list-manage.com”,”uuid”:”41b37b8eb6c2ec26fa20f7b80″,”lid”:”15a85cdfa1″}) })</script>

    How do I adjust this code to work in the Javascript box in the X customizer?

    My site URL is http://www.shalvah.com, but is currently not live. Let me know what other info you need from me to solve this issue.

    Thank you!

    #159556

    Rad
    Moderator

    Hi there,

    Thanks for posting in.

    Not possible for customizer, but you can try this.

    Because this requires a template change, I’d advise that you setup a child theme. This allows you to make code changes that won’t be overwritten when an X update is released. After your child theme is setup, please review how we recommend making template changes in Customization Best Practices.

    Add this code at your child theme’s functions.php

    add_action('wp_footer', 'the_mail_chimp_code', 9999 );
    
    function the_mail_chimp_code () { ?>
    
    <script type="text/javascript" src="//s3.amazonaws.com/downloads.mailchimp.com/js/signup-forms/popup/embed.js" data-dojo-config="usePlainJson: true, isDebug: false"></script><script type="text/javascript">require(["mojo/signup-forms/Loader"], function(L) { L.start({"baseUrl":"mc.us9.list-manage.com","uuid":"41b37b8eb6c2ec26fa20f7b80","lid":"15a85cdfa1"}) })</script>
    
    <?php }

    Hope this helps.

    #168254

    jeromekang
    Participant

    Hi, I have the same dilemma. I have the same kind of code (subscriber pop-up) from mailchimp. I added the code you suggested but it isn’t popping up. And how do you limit these to only happen once for visit?

    Thanks

    #168255

    jeromekang
    Participant

    Update:

    So It Already Pops Up. But yeah..it pops up on all the pages. AND.. it cannot be seen fully as the nav bar is blocking it. Please refer to the picture below. Site is http://www.uddo.ph

    Fail in Displaying Popup Properly

    #168613

    Kosher K
    Member

    Hi There,

    Thanks for writing in,

    Your issue is because you have fixed navigation, you need to use static navigation so it won’t cover the pop-up, Regarding about limiting the pop-up to only show once, you need to integrate it using cookie with custom javascript. Unfortunately, this is beyond the support we can offer.

    Have a great day

    #169524

    jeromekang
    Participant

    I see. Thanks!

    #169727

    Christopher
    Moderator

    You’re welcome.