mbr_list
Usage
This shortcode subscribes/unsubscribes an ActiveCampaign contact to/from ActiveCampaign lists. The contact is either that linked with the logged in user, or the contact specified.
The shortcode can be run automatically or used to generate a button or link within a page or post that, when clicked, will subscribe/unsubscribe the contact to/from the lists.
Parameters
Parameters | Description |
---|---|
cid | The ActiveCampaign contact ID of the contact to add to or remove from automations. Defaults: Current logged in user contact ID. Required: no. |
subscribe | One or more list ID's defined within ActiveCampaign to subscribe the contact to. The available lists can be found in ActiveMember360, Utilities, Lists. If more than one is entered, please separate with commas. Defaults: none. Required: Yes if unsubscribe parameter not set. |
unsubsribe | One or more list ID's defined within ActiveCampaign to unsubscribe the contact from. The available lists can be found in ActiveMember360, Utilities, Lists. If more than one is entered, please separate with commas. Defaults: none. Required: Yes if subscribe parameter not set. |
unsubscribe_reason | Reason for using unsubscribe .Default: Contact unsubscribed on site Required: no. |
autorun | If set to yes the shortcode will execute without waiting for user input. Otherwise it will generate a form and a submit button or link_style and wait for user input. If set to yes the following parameters will be ignored; link_text , link_style , button_text , button_image , button_style , redirect_popup , aftertext .Permissible Values: yes Defaults: none. Required: no. |
link_text | The text to display for the link. Defaults: Click here to submit Required: no. |
link_style | The CSS style to apply for the link. Defaults: mbr_list_link Required: no. |
link_id | The CSS ID to apply for the link. Defaults: mbr_list_link Required: no. |
link_class | The CSS class to apply for the link. Defaults: mbr_list_link Required: no. |
button_text | The text to displayin the button. Defaults: Click here to submit Required: no. |
button_image | The URL of the image to use for the button. Defaults: none. Required: no. |
button_style | The CSS style to apply for the button. Defaults: mbr_list_btn Required: no. |
button_id | The CSS ID to apply for the button. Defaults: mbr_list_btn Required: no. |
button_class | The CSS class to apply for the button. Defaults: mbr_list_btn Required: no. |
redirect | The URL to send the user to after subscribing/unsubscribing the contact to/from the lists. A special value can be passed, #reload#, to force all shortcodes on the page to resolve based on the latest changes that may have been introduced by processing this shortcode. Defaults: none. Required: no. |
redirect_popup | Specifies whether the user will be redirected to a new window after clicking the link or button. Only used if the redirect parameter is set. Permissible Values: yes Default: none. Required: no. |
after_text | The text that should be displayed after the shortcode has been processed, if the user hasn’t been redirected. Default: Your request was processed Required: no. |
Validity
This shortcode is only processed for logged in users who also exist as contacts within ActiveCampaign.
In all other cases, including WordPress users with the Administrator role nothing will be processed.
Conditional Branching
This shortcode does NOT support conditional branching with [ELSE_list].
Nesting
Shortcode nesting is NOT supported.
Examples
- Example 1
- Example 2
- Example 3
- Example 4
Subscribe the contact linked with the logged in user to the ActiveCampaign lists with IDs 8 and 9 when they click on the link labelled 'Click here'. When processing has completed display reload the current page:
[mbr_list subscribe='8,9' redirect='#reload#' link_text='Click here']
Subscribe the contact linked with the logged in user to the ActiveCampaign lists with IDs 1, 5 and 6 and unsubscribe them from the lists with IDs 7 and 8. Process this automatically as soon as they visit the page. When processing has completed display 'Your request was processed':
[mbr_list autorun='yes' subscribe='1,5,6' unsubscribe='7,8']
Subscribe the contact with ActiveCampaign contact ID 1234 to the ActiveCampaign lists with IDs 1, 3 and 5. Process this automatically as soon as the page is visited. No message will be shown when processing has completed:
[mbr_list cid='1234' subscribe='1,3,5' autorun='yes']
Subscribe the contact linked with the logged in user to the ActiveCampaign lists with IDs 1, 5 and 7 and unsubscribe them from the lists with IDs 10 and 12 when they click on the link labelled 'Click here'. When processing has completed redirect to the URL https://mysite.com:
[mbr_list subscribe='1,5,7' unsubscribe='10,12' button_text='Click here' redirect='https://mysite.com']
API
There is currently no ActiveMember360 API function equivalent for this shortcode.