Primary

[groups_newsletters_subscribe]

This shortcode is used to render a subscription form for any visitor.

It is automatically included on the Newsletter Subscription page that can be generated under Subscription Activation Page in Newsletters > Settings.

Here visitors can input their email address and must confirm their subscription through an activation link that is sent to their email address.

The shortcode offers flexible options that can be set using these attributes:

  • description: The text shown in the form that invites to subscribe. Defaults to ‘Subscribe to our newsletters’.
  • description_class: CSS class applied to the description. Default: ‘description’.
  • field_label: The label of the email field. Default: ‘Email’.
  • field_class : CSS class of the email field. Default: ‘field’.
  • email_placeholder : Placeholder text for the email field. Default: ‘Your email address’.
  • subscribe_label: Label used for the Subscribe button, default: ‘Subscribe’.
  • subscribe_class: CSS class used for the Subscribe button, default: ‘button wp-element-button’.
  • captcha_class: CSS class applied to captcha. Default: ‘captcha’.
  • captcha_filter: Function name, render a custom captcha. Default: ”.
  • captcha_validate_filter: Function name, custom captcha validator. Default: ”.
  • captcha_description: The text that explains the captcha, defaults to ‘Are you human?’.
  • captcha_description_class: CSS class for the captcha description. Default: ‘captcha-description’.
  • recaptcha: Set to ‘yes’ to use reCAPTCHA. Defaults to ‘no’. Deprecated since version 3.0.0.
  • recaptcha_public_key: Provide your reCAPTCHA public key, required when using reCAPTCHA. Deprecated since version 3.0.0.
  • recaptcha_private_key: Provide your reCAPTCHA private key, required when using reCAPTCHA. Deprecated since version 3.0.0.
  • recaptcha_site_key: Provide your reCAPTCHA site key, required when using reCAPTCHA v2.
  • recaptcha_secret_key: Provide your reCAPTCHA secret key, required when using reCAPTCHA v2.
  • recaptcha_error_message: Defaults to ‘Please solve the captcha to proof that you are human.’.
  • captcha_error_message: Defaults to ‘Please solve the captcha to proof that you are human.’.
  • confirm_message: Message used to ask for subscription confirmation. Default: ‘Thank you. Please check your email to confirm your subscription.’
  • resend_inactive: If the activation email should be sent when an inactive email is resubmitted. Defaults to ‘yes’.
  • hide_on_activation: Whether the form should be hidden when an incoming activation is recognized. Defaults to ‘yes’.
  • hide_on_cancellation: Whether the form should be hidden when an incoming cancellation is recognized. Defaults to ‘yes’.
  • user_subscribe_form: For registered users, the alternative direct subscription form is displayed. Defaults to ‘yes’.
  • force_user_login: Existing emails require login. Defaults to ‘yes’.
  • login_in_message: Ask visitor to log in to subscribe, default: ‘Please log in to subscribe.’.
  • user_confirm_message: Message confirming subscription, default: ‘Thank you. Your subscription is confirmed.’.
  • user_unsubscribed_message: Message after unsubscribing, default: ‘Thank you. Your subscription has been removed.’.
  • subscriber_message: Shown to subscribed users. Default: You are subscribed to our newsletters.’.
  • show_unsubscribe: Whether to show the unsubscribe option for subscribed users, defaults to ‘yes’.
  • unsubscribe_label: Label used for the Unsubscribe button, default: ‘Unsubscribe’.
  • unsubscribe_class: CSS class used for the Unsubscribe button, default: ‘button wp-element-button’.

Example

This is how you would go about customizing your subscription form to use the reCAPTCHA service to avoid bots and use a clean reCAPTCHA widget that can be custom-styled:

[groups_newsletters_subscribe recaptcha="yes" recaptcha_public_key="..." recaptcha_private_key="..." recaptcha_widget="groups_newsletters_neutral"]