Shortcode [mst_subscribe]
This shortcode [mst_subscribe] can be put in any page or post to show a form where the user can subscribe to your mailing list(s).
Without any customization, it looks like this:
You can customize the appearance and functionality of the subscribe shortcode with parameters.
Here is an example:
[mst_subscribe id="1" hideList buttonTxt="Join list" requireTerms="yes" termsLabel="Read and understood the terms of services" termsLinkUrl="https://example.com" ]
This changes the form like so:
In the above example the following parameters are used:
- id
With that a specific mailing list is selected for the subscribe form (to not show a dropdown with a choice). The number references the ID of the mailing list. You can look up the ID in WP Mailster’s table of mailing lists. - hideList
This hides the name of the mailing list. - buttonTxt
Replace the default “subscribe” button text with a custom call to action. - requireTerms
Require the user to accept a checkbox before being able to subscribe. - termsLabel
Only works combined with the requireTerms parameter described above. Customizes the text. - termsLinkUrl
Only works combined with the requireTerms parameter described above. Customizes the terms of services URL.
You can find a full documentation of the parameters at the end of this article.
Shortcode [mst_unsubscribe]
This shortcode [mst_unsubscribe] can be put in any page or post to show a form where the user can unsubscribe from your mailing list(s).
Without any customization, it looks something like that:
You can customize the appearance and functionality of the unsubscribe shortcode with parameters.
Here is an example:
[mst_unsubscribe id="1" hideList ]
This changes the form like so:
In the above example the following parameters are used:
- id
With that a specific mailing list is selected for the unsubscribe form (to not show a dropdown with a choice). The number references the ID of the mailing list. You can look up the ID in WP Mailster’s table of mailing lists. - hideList
This hides the name of the mailing list. - buttonTxt
Replace the default “unsubscribe” button text with a custom call to action.
- id
You can find a full documentation of the parameters at the end of this article.
Shortcode Parameters
The following parameters work for both subscribe (mst_subscribe) and unsubscribe (mst_unsubscribe) shortcodes.
Parameter | Description | Example |
---|---|---|
add2Group | Automatically add users to the WP Mailster user group provided, when they subscribe. Provide the group’s ID. See also removeFromGroup. | [mst_subscribe id=”1″ add2Group=”2″ ] |
buttonTxt | Text on the submit button | [mst_subscribe buttonTxt=”Crazy Button” ] |
captcha (*) | Use a captcha to secure your form against spammers and bots | [mst_subscribe captcha=”recaptcha” ] |
css | CSS Prefix of all used CSS classes | [mst_subscribe css=”my_css_prefix_” ] |
emailLabel | Label of the email field | [mst_subscribe emailLabel=”Your email address” ] |
headerTxt | Headline of the form | [mst_subscribe headerTxt=”Our conversations – Join here!” ] |
hideList | Hide the mailing list name, either use without a value or yes as the value (hideList=”yes”) | [mst_subscribe hideList ]
|
hideName | Don’t require a subscriber name, either use without a value or yes as the value (hideName=”yes”) | [mst_subscribe hideName ] |
id | ID of the mailing list | [mst_subscribe id=”1″] |
listLabel | Label of the mailing list name | [mst_subscribe listLabel=”Newsletter” ] |
nameLabel | Label of the user name field | [mst_subscribe nameLabel=”Your first name” ] |
smartHide | Hide subsribe form when already subscribed, hide unsubscribe form when not yet subscribed | [mst_subscribe smartHide=”yes” ] |
submitTxt | Text to display after successful (un)subscription | [mst_subscribe submitTxt=”Thank you for subscribing!” ] |
removeFromGroup | Automatically removes users from the WP Mailster user group provided, when they unsubscribe. Provide the group’s ID. See also add2Group. | [mst_unsubscribe id=”1″ removeFromGroup=”2″ ] |
requireTerms | Require terms of service approval. Adds a checkbox and a text the user has to accept to (by clicking the checkbox) in order to subscribe. See also the following parameter termsLabel, termsLinkLabel and termsLinkUrl. | [mst_subscribe requireTerms=”yes” ] |
termsLabel | Label of the terms of service approval request | [mst_subscribe requireTerms=”yes” termsLabel=”Yes, I have read and accept the terms of service” ] |
termsLinkLabel | Label of the link pointing to the terms of service | [mst_subscribe requireTerms=”yes” termsLabel=”Yes, I have read and accept the terms of service” termsLinkLabel=”(Our Policy)” ] |
termsLinkUrl | URL of the link pointing to the terms of service | [mst_subscribe requireTerms=”yes” termsLabel=”Yes, I have read and accept the terms of service” termsLinkLabel=”(Our Policy)” termsLinkUrl=”https://example.com/privacy” ] |
(*) Some features are only included in our paid editions