MailChimp shortcodes
Overview
This document provides instructions on how to use shortcodes of the MailChimp extension.
Ultimate Member uses WordPress shortcodes to allow users to perform certain actions as well as display forms and templates. You may use shortcodes in the posts(page) content and text widgets.
Contents
[ultimatemember_mailchimp_subscribe] - Show subscribe form
[ultimatemember_mailchimp_unsubscribe] - Show unsubscribe form
Shortcodes
[ultimatemember_mailchimp_subscribe] #
This shortcode used to subscribe users and guests. The shortcode renders a form on the screen. Once the form is submitted the user will be added to the audience with the status “pending”. The user has to confirm the subscription by following the instructions in the email that MailChimp automatically sends to new contacts with the status “pending”.
The shortcode attributes:
Key | Type | Default | Description |
id | integer, string | '' | The ID of connection, see [wp-admin > Ultimate Member > MailChimp]. You can list several connections separated by comma. Gets all active connections if empty. |
fields | string | 'user_email' | The list of fields (metakey) separated by comma. The field 'user_email' is always required. Required fields added automatically. |
messages | string | '' | Custom text shown before the form |
groups | integer | 0 | Show groups select or not |
tags | integer | 0 | Show groups select or not |
show_checkboxes | integer | 1 | Show audience checkboxes or use hidden inputs. Hidden inputs can’t be turned off. Groups and tags can’t be used without checkboxes. |
show_label | integer | 1 | Show field labels or not |
show_placeholder | integer | 1 | Show field placeholders or not |
Examples:
[ultimatemember_mailchimp_subscribe id="345,346" groups="1" tags="1" show_checkboxes="1" show_label="1" show_placeholder="1"]
[ultimatemember_mailchimp_subscribe id="345,346" show_checkboxes="0" show_label="0"]
[ultimatemember_mailchimp_unsubscribe] #
This shortcode used to unsubscribe users and guests. The shortcode renders a form on the screen. Once the form is submitted the extension sends the email “MailChimp - Newsletters unsubscribe”. The user has to confirm the unsubscription by clicking a link in the email.
The shortcode attributes:
Key | Type | Default | Description |
id | integer, string | '' | The ID of connection, see [wp-admin > Ultimate Member > MailChimp]. You can list several connections separated by comma. Gets all active connections if empty. |
messages | string | '' | Custom text shown before the form |
show_checkboxes | integer | 1 | Show audience checkboxes or use hidden inputs. Hidden inputs can’t be turned off. |
show_label | integer | 1 | Show field labels or not |
show_placeholder | integer | 1 | Show field placeholders or not |
Examples:
[ultimatemember_mailchimp_unsubscribe]
[ultimatemember_mailchimp_unsubscribe show_checkboxes="0" show_label="0"]