Subscribe / Unsubscribe Shortcodes

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.

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.

ParameterDescriptionExample
add2GroupAutomatically 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″ ]
buttonTxtText 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” ]
cssCSS Prefix of all used CSS classes
[mst_subscribe css=”my_css_prefix_” ]
emailLabelLabel of the email field
[mst_subscribe emailLabel=”Your email address” ]
headerTxtHeadline of the form
[mst_subscribe headerTxt=”Our conversations – Join here!” ]
hideListHide the mailing list name, either use without a value or yes as the value (hideList=”yes”)
[mst_subscribe hideList ]

 

hideNameDon’t require a subscriber name, either use without a value or yes as the value (hideName=”yes”)
[mst_subscribe hideName ]
idID of the mailing list
[mst_subscribe id=”1″]
listLabelLabel of the mailing list name
[mst_subscribe listLabel=”Newsletter” ]
nameLabelLabel of the user name field
[mst_subscribe nameLabel=”Your first name” ]
smartHideHide subsribe form when already subscribed, hide unsubscribe form when not yet subscribed
[mst_subscribe smartHide=”yes” ]
submitTxtText to display after successful (un)subscription
[mst_subscribe submitTxt=”Thank you for subscribing!” ]
removeFromGroupAutomatically 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″ ]
requireTermsRequire 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” ]
termsLabelLabel of the terms of service approval request
[mst_subscribe requireTerms=”yes” termsLabel=”Yes, I have read and accept the terms of service” ]
termsLinkLabelLabel 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)” ]
termsLinkUrlURL 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

Subscriber Widget

The easiest way to enable your site visitors to sign-up for your mailing lists, is to provide them with a subscribe form. WP Mailster’s subscriber widget can act as either a subsribe form or alternatively as an unsubscribe form.

Creating a Widget

  • In the WordPress admin section, go to Appearance > Widgets
  • Locate WP Mailster’s widget in the list of available widgets tut_012_add_user_hover
  • Click on Add Widget

All Widget Settings

Add to cart