Mailchimp Embedded Code Doesn't Work
-
Hi,
I am trying to embed a Mailchimp signup form on our WordPress.com website. According to Mailchimp’s instructions I am supposed to copy and paste the code provided into a text widget. The problem, however, is that when I do that WordPress seems to strip the code of its content. I end up having some of the code appearing as plain text where the form is supposed to show up. Any suggestions?
This is the code we are supposed to copy and paste according to Mailchimp
<!– Begin MailChimp Signup Form –>
<link href=’//cdn-images.mailchimp.com/embedcode/slim-081711.css’ rel=’stylesheet’ type=’text/css’>
<style type=’text/css’>
#mc_embed_signup{background:#fff; clear:left; font:14px Helvetica,Arial,sans-serif; }
/* Add your own MailChimp form style overrides in your site stylesheet or in this style block.
We recommend moving this block and the preceding CSS link to the HEAD of your HTML file. */
</style>
<div id=’mc_embed_signup’>
<form action=’//hiddenartshop.us4.list-manage.com/subscribe/post?u=6442e2e382ba83f1fb2bd89a2&id=2cdcbe2b85′ method=’post’ id=’mc-embedded-subscribe-form’ name=’mc-embedded-subscribe-form’ class=’validate’ target=’_blank’ novalidate>
<div id=’mc_embed_signup_scroll’>
<label for=’mce-EMAIL’>Subscribe to our mailing list</label>
<input type=’email’ value=” name=’EMAIL’ class=’email’ id=’mce-EMAIL’ placeholder=’email address’ required>
<!– real people should not fill this in and expect good things – do not remove this or risk form bot signups–>
<div style=’position: absolute; left: -5000px;’><input type=’text’ name=’b_6442e2e382ba83f1fb2bd89a2_2cdcbe2b85′ tabindex=’-1′ value=”></div>
<div class=’clear’><input type=’submit’ value=’Subscribe’ name=’subscribe’ id=’mc-embedded-subscribe’ class=’button’></div>
</div>
</form>
</div><!–End mc_embed_signup–>
The blog I need help with is: (visible only to logged in users)
-
Yes, since WordPress.com is a shared environment we take some extra precautions with some code. One of those precaustions is that we strip out the form HTML tag that MailChimp’s code uses. Their recommended code does work well on self-hosted sites running the WordPress software though.
For now, the only suggestion I can offer is instead of hosting the signup page on your site, use MailChimp’s hosted signup page and provide a link to that signup page for your site.
I’ll also inform our developers that we’ve had another request to allow MailChimp integration on WordPress.com sites.
-Alex G.
- The topic ‘Mailchimp Embedded Code Doesn't Work’ is closed to new replies.