-
AuthorPosts
-
September 24, 2018 at 2:35 am #1013440
Hello,
I installed the Mailchimp plug-in, and would like to know how I can make a pop up box to sign up for newsletter pop up on my page? I activated on my Widget but did not see a difference.
September 24, 2018 at 2:31 pm #1013636Hey Wisith,
I’m not familiar with the Mailchimp plug-in but you can create a popup with the mailchimp form builder: https://mailchimp.com/help/add-a-pop-up-signup-form-to-your-website/
Then add this code to your child theme 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');
and replace the data at the top
baseUrl: 'mc.us8.list-manage.com', uuid: '8e6cb1cf9675fdb6769c3732e', lid: 'eea4db8087'
with the data of your popup (it can be found in the code mailchimp gives you to embed the popup form).
Best regards,
PeterSeptember 28, 2018 at 5:21 am #1015583Hi Dude,
Thank you for your help. When you said to add the code to my child theme functions.php:
Where can I find the child theme functions field to add the code? I never done this before.
September 28, 2018 at 8:43 am #1015621Hi,
Please go to Appearance > Editor and make sure the “Enfold Child” theme is selected in the dropdown on the right side (if you’re not using a child theme make sure “Enfold” is selected).Then click on “functions.php” in file/folder tree on the right side sidebar. The editor will then load this file. Scroll to the very bottom of the file and insert the code there. Then save the file.
Best regards,
Peter -
AuthorPosts
- You must be logged in to reply to this topic.