Title: Adding MailChimp Code to Theme
Last modified: September 18, 2020

---

# Adding MailChimp Code to Theme

 *  [noshoescashonly](https://wordpress.org/support/users/aminakbarpour/)
 * (@aminakbarpour)
 * [5 years, 8 months ago](https://wordpress.org/support/topic/adding-mailchimp-code-to-theme/)
 * Hi – I’m trying to connect WordPress to MailChimp.
 * I opened up the header.php file and added the following code:
 * <script id=”mcjs”>!function(c,h,i,m,p){m=c.createElement(h),p=c.getElementsByTagName(
   h)[0],m.async=1,m.src=i,p.parentNode.insertBefore(m,p)}(document,”script”,”[https://chimpstatic.com/mcjs-connected/js/users/d2445d0e522a7db96c2415edc/0a50176b524204c5156cf695e.js&#8221](https://chimpstatic.com/mcjs-connected/js/users/d2445d0e522a7db96c2415edc/0a50176b524204c5156cf695e.js&#8221););
   </script>
 * then saved it and closed the file transfer. I tried testing the connection but
   MailChimp is saying it can’t find it. Additionally, there’s now a new file showing
   up according to the FTP called header.php.uploading.1600451467
 * did I go about this wrong?
    -  This topic was modified 5 years, 8 months ago by [noshoescashonly](https://wordpress.org/support/users/aminakbarpour/).

Viewing 5 replies - 1 through 5 (of 5 total)

 *  Moderator [Steven Stern (sterndata)](https://wordpress.org/support/users/sterndata/)
 * (@sterndata)
 * Volunteer Forum Moderator
 * [5 years, 8 months ago](https://wordpress.org/support/topic/adding-mailchimp-code-to-theme/#post-13425662)
 * Yes, you did it wrong. 🙁
 * If you want to add code to your header, use [https://wordpress.org/plugins/insert-headers-and-footers/](https://wordpress.org/plugins/insert-headers-and-footers/)
 *  Thread Starter [noshoescashonly](https://wordpress.org/support/users/aminakbarpour/)
 * (@aminakbarpour)
 * [5 years, 8 months ago](https://wordpress.org/support/topic/adding-mailchimp-code-to-theme/#post-13425702)
 * Rats! Do I need to do anything to the header.php file to make sure I didn’t break
   anything? AKA delete the header.php.uploading file or?
 *  Moderator [Steven Stern (sterndata)](https://wordpress.org/support/users/sterndata/)
 * (@sterndata)
 * Volunteer Forum Moderator
 * [5 years, 8 months ago](https://wordpress.org/support/topic/adding-mailchimp-code-to-theme/#post-13425819)
 * delete header.php.uploading
 *  Thread Starter [noshoescashonly](https://wordpress.org/support/users/aminakbarpour/)
 * (@aminakbarpour)
 * [5 years, 8 months ago](https://wordpress.org/support/topic/adding-mailchimp-code-to-theme/#post-13425836)
 * Will do.
 * Additionally, following those steps MailChimp is still not able to successfully
   connect to my WordPress. I installed the plugin you directed me to, and added
   the aforementioned code to the “Scripts in Header” section.
 * Thoughts on what I could be doing wrong here?
 *  Moderator [Steven Stern (sterndata)](https://wordpress.org/support/users/sterndata/)
 * (@sterndata)
 * Volunteer Forum Moderator
 * [5 years, 8 months ago](https://wordpress.org/support/topic/adding-mailchimp-code-to-theme/#post-13426201)
 * As that code comes directly from Mailchimp, I suggest contacting them about it.

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Adding MailChimp Code to Theme’ is closed to new replies.

## Tags

 * [updating theme](https://wordpress.org/support/topic-tag/updating-theme/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 5 replies
 * 2 participants
 * Last reply from: [Steven Stern (sterndata)](https://wordpress.org/support/users/sterndata/)
 * Last activity: [5 years, 8 months ago](https://wordpress.org/support/topic/adding-mailchimp-code-to-theme/#post-13426201)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
