Tagged: 

Viewing 16 posts - 1 through 16 (of 16 total)
  • Author
    Posts
  • #799870

    Hi there,
    I’d like to add a mailchimp pop up form on a specific page.
    the page is http://massimobrotto.com/gensets-para-dummies/curso-generadores-electricos/

    and the script from mailchimp is in pvt content.

    thanks for your help!

    #799919

    Hey massimobr,

    Are there 2 separate scripts? 1 for the function, and 1 for rendering I assume? If you have not, please try adding the scripts to code block elements. Also, if possible please provide admin info for the WordPress dash.

    Best regards,
    Jordan Shannon

    #800027

    Hi,
    I only have the script in the comment, thet’s what Mailchimp allows me to copy from their ‘form designer’.
    I tried to copy that script in the code block but it does not work. The page does not load. I tried with the block at the beginning of the page and at the bottom , no way.

    thanks

    #800254

    Hi,

    This is caused by the way mailchimp tries to access the jquery script. There is actually a simpler solution than adding the raw script. Please see the following: https://www.organicweb.com.au/22571/wordpress/jetpack-mailchimp-wordpress/

    Best regards,
    Jordan Shannon

    #800268

    hi, isn’t that for wordpress.com?
    I can’t find the MailChimp Subscriber Popup. in my enfold widget list

    am I right?

    #800273

    Hi,

    Please see the following:

    https://wordpress.org/plugins/mailchimp-for-wp/

    You can install it from the dash if you search for it from the plugins page.

    Best regards,
    Jordan Shannon

    #800274

    so I need another plug in…
    I’ll try

    #800279

    Hi,

    Please let me know if this works out for you.

    Best regards,
    Jordan Shannon

    #800284

    it works but I would prefer to use html block or widgets.

    thanks anyway

    #800293

    Hi,

    Ok, in that manner you will have to modify the raw files.

    MailChimp’s default popup scripts can break on WordPress sites that use jQuery/jQuery UI unless you include their embed code as the final elements before the closing body tag.
    Including them in this way isn’t always possible or easy with WordPress.
    The code below is an alternative implementation of the loader that forces MailChimp’s popup scripts to appear below all other scripts upon page load.

    Add the following to functions.php:

    add_action( ‘wp_footer’, ‘myscript’ );
    function myscript() {
    <script>
        // Fill in your MailChimp popup settings below.
        // These can be found in the original popup script from MailChimp.
        var mailchimpConfig = {
            baseUrl: 'mc.us1.list-manage.com',
            uuid: 'a123456789abcdefghijklmno',
            lid: '1abc12345a'
        };
        
        // 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>
    }

    To use it, modify the baseUrl, uuid, and lid attributes with the ones from the original popup script that MailChimp supplies.

    Best regards,
    Jordan Shannon

    #800413

    That sounds too complicated.
    By the way, if I change functions.php, then I loose the modifications when the theme update, right?

    #800414

    Hi,

    Not if you are using a child theme, which is recommended if you plan to make heavy mods to the theme.

    Best regards,
    Jordan Shannon

    #800418

    I am not using a child theme currently.
    Could I start using (implementing) a child theme without loosing the contents i currently have?

    I am planning a site redesign before the end of the year, so that will probably the moment when I implementing child theme.

    #800420

    Hi,

    You should be able to copy over any custom styles and functions with no issue, just be sure to do a full backup before attempting to switch over to a child theme.

    Best regards,
    Jordan Shannon

    #800426

    Thanks! I will investigate when the time comes.

    Thanks and regards

    #800434

    Hi,

    Great, I am glad I could provide some insight. If you need additional help please let us know here in the forums.

    Best regards,
    Jordan Shannon

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