Accepted shortcode arguments

The MailChimp for WordPress plugin comes with a shortcode that allows you to place a sign-up form just about anywhere. You can put a shortcode in a Post, Page or Widget to display the form to website visitors in that position.

[mc4wp_form]

While this shortcode works without any arguments, you can specify a few arguments to customize the default behaviour.

id

The id argument is used to specify which form to show.

The following example would show the form with ID 10.

[mc4wp_form id="10"]

element_id

With element_id="custom-id" you can give the form element an ID of your choosing.

This is particularly helpful when you want to style your form with CSS. By using this attribute, your shortcode would look like so:

[mc4wp-form id="XX" element_id="custom-id"]

lists

With lists="separate,by,comma" you can select which lists the form subscribes to.

Using this attribute will override the setting given in the form settings. This can be useful if you want to re-use the same form but subscribe to different lists on a per-shortcode basis.

Make sure to use the ID's of your MailChimp lists here, which you can find under MailChimp for WP > MailChimp & License > MailChimp Data.

The final shortcode would look something like this.

[mc4wp_form lists="abcdef,anotherlist"]

Was this article helpful? ·