Tagged: MailChimp
-
AuthorPosts
-
May 25, 2017 at 11:03 pm #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!
May 26, 2017 at 1:48 am #799919Hey 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 ShannonMay 26, 2017 at 9:10 am #800027Hi,
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
May 26, 2017 at 4:58 pm #800254Hi,
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 ShannonMay 26, 2017 at 5:16 pm #800268hi, isn’t that for wordpress.com?
I can’t find the MailChimp Subscriber Popup. in my enfold widget listam I right?
May 26, 2017 at 5:20 pm #800273Hi,
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 ShannonMay 26, 2017 at 5:28 pm #800274so I need another plug in…
I’ll tryMay 26, 2017 at 5:35 pm #800279Hi,
Please let me know if this works out for you.
Best regards,
Jordan ShannonMay 26, 2017 at 5:49 pm #800284it works but I would prefer to use html block or widgets.
thanks anyway
May 26, 2017 at 6:09 pm #800293Hi,
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 ShannonMay 26, 2017 at 10:24 pm #800413That sounds too complicated.
By the way, if I change functions.php, then I loose the modifications when the theme update, right?May 26, 2017 at 10:25 pm #800414Hi,
Not if you are using a child theme, which is recommended if you plan to make heavy mods to the theme.
Best regards,
Jordan ShannonMay 26, 2017 at 10:32 pm #800418I 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.
May 26, 2017 at 10:36 pm #800420Hi,
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 ShannonMay 26, 2017 at 10:47 pm #800426Thanks! I will investigate when the time comes.
Thanks and regards
May 26, 2017 at 10:56 pm #800434Hi,
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 -
AuthorPosts
- You must be logged in to reply to this topic.