1. Home
  2. ReHub Theme
  3. How to …
  4. How to add Mailchimp email form to post or page

How to add Mailchimp email form to post or page


1. Login to your Mailchimp account, and click to create Embedded form

Then, choose Condensed form

Then, you You will see Code of form on this page in Embedded Form Code field. Click to Generate code first.

2. In this code, you need only two fields, which you need to copy (Action and Name)

In my screen, it’s action https://wpsoul.us20.list-manage.com/subscribe/post?u=28f9e7f7e740f818812abb305&id=323d392873 and name b_28f9e7f7e740f818812abb305_323d392873

3. To insert Mailchimp form in theme with formating, use next shortcode. If you want to insert it in sidebar, add Text widget in sidebar and add shortcode. If you need to add form in bottom of post, add it in  Theme option   Ads option   After post area 

[rh_mailchimp action="https://wpsoul.us20.list-manage.com/subscribe/post?u=28f9e7f7e740f818812abb305&id=323d392873" inputname="b_28f9e7f7e740f818812abb305_323d392873" title="Subscribe to our list" subtitle="Don't worry, we don't spam" button="Subscribe" placeholder="Email address"]

Action‘ and ‘inputname‘ is required fields, set here your own name and action from previous step.

title is Title before mail input

subtitle is for word under email input

button is label on button

placeholder is placeholder in field

All of this, will give you next look

Adding mailbox as Page element

You can also add mailbox as page block. Example:

To add next block, use page builder and ready template Name of this template is Elements: full width subscribe block with Mail Chimp form 

Now, change Raw HTML module on Text module and use shortcode as in previous step, but add new parameter flat=1. Also, you can delete title and subtitle parameter. Example:

[rh_mailchimp action="https://wpsoul.us20.list-manage.com/subscribe/post?u=28f9e7f7e740f818812abb305&id=323d392873" inputname="b_28f9e7f7e740f818812abb305_323d392873" flat=1 button="Subscribe" placeholder="Email address"]

How to add another color for button

By default, it’s green. You can add other color with next code

.rehub_chimp_flat #mc_embed_signup input#mc-embedded-subscribe{background-color:red}

you can place this in theme options – general options – custom css