Description: The article is about mailchimp login. In this article,you are going to learn how to add a Mailchimp popup on WordPress without using a plugin. You can add the code on the header and you need to make sure that you add it before WP head,you can also add it on the footer.
If you’ve ever tried to add a MailChimp popup on your WordPress website,you may have found that it doesn’t work even after you embed the code on the footer,one of the reasons why it happens is that the MailChimp jQuery code usually collides with the WordPress code. In this tutorial,we’re going to see how we can go about that and we are going to see two ways in which you can make the form show up on your WordPress website without using any plug-in.
One of the reasons why I decide to start using the MailChimp form without using any plug-in or any third party is that I’ve been using mail munch on my site for a very long time,when I do an analysis of my web page,I realized that mail munch is adding to the load time on my website,my website has to wait to load before it can tell the browser is fully loaded,that’s why I start using the MailChimp default pop up without using any third party plug-in or any third party platform.
The first way you can do this is that you can take the code and you can add it on your header which is not recommended in most cases,when you’re adding any third party scripts,you need to add them on the footer of your web page,even though this will work for you,you shouldn’t do it because it is not recommended. It’s going to slow down your webpage,the browser will have to download everything in the form,it will continue loading the other things that are on your web page.
That is not true for HTTP,but most people are still using HTTP1,if you want to add it,you’ll come here and click on View code. Let’s copy this code,I will put it on the header,if you’re putting it on the header,you need to make sure that you have put it before the WP head because this is where all the plugins are loaded for WordPress.
That’s why you need to put it before this,if you put it after this,the jQuery will have already been loaded and we don’t want that,we want this to work out without having any issues with WordPress. You need to put it before the WP head,that’s the most important thing. If I update this and then I clear my browser cache,I will come to a new private window.
If I load my website,I should be able to see the form. You can see even mail munch is loaded. This is the one for MailChimp and you can see it works,if you put it on the header above the WP head,it’s going to work,but that’s not recommended.
I am going to show you the other way to make our MailChimp pop-up work on WordPress by default. I’m going to close this for now and if I come here,I’ll remove this code so that I can put it on the footer. Then I will update and come to the footer,let me add it before the mailman and I can add it after that WP footer,you can add it anywhere you can,most cases you should add it before the last one.
I can put it here,it doesn’t matter,I want to do that to make sure that it works,I am going to make sure that I can add something to tell jQuery not to conflict with this. You can see the second script,this is where we’re having conflicts. If I add it here,there is no conflict. I’m sure it’s going to work. Let me copy it from here instead of having to type it.
Now I can paste it in there. In most cases,if you are using other things,you’re going to use the dollar sign. You’re going to use jQuery equally instead of using the dollar sign. You can add it before this,this is going to make sure that jQuery does not conflict with any code that comes next. If I update the file and then clear the cache,it will work fine. Let me open Chrome this time,I’ll open new incognito window.
You can see that mail chimp is loaded and mail munch is also loaded,but I will remove this,that’s how you can add the mail chimp pop up on your WordPress website. This is the way that you can do in brief. You can add the code on the header and you need to make sure that you add it before WP head,this is where all the plug-in injections will happen in WordPress. You need to add it before the WP head.
The other way is that you can add it on the footer,this is a recommended way,you can add it on the footer. You will add the equally on the second script,there is no conflict before the require statement,this helps to prevent any conflicts between the MailChimp jQuery and the WordPress jQuery. If you come here to take the code,you can use the second script,you can add it without conflicts.
You can copy and put it on the footer or you can put it on any webpage where you want it,if you want it to appear on specific pages only on your WordPress website,you can do that. Maybe you don’t want it on the home page and you’re running WordPress,you can take this code and you can put it on a sidebar.
If you take the code and put it on a sidebar widget,you’ll use the HTML code widget on your WordPress,it’s going to work. It’s going to make sure that it doesn’t conflict with WordPress and that’s what usually makes it not work.
If you didn’t know how to work with the MailChimp pop up,you can find the tutorial. We have covered different parts on how you can create all these different types of forms in MailChimp. They added a bunch of things so you can go and see which one you want.