How it Works
After installing and activating the plugin, add the shortcode to your page, post or in a widget.
Shortcode attributes allow you to show only certain signup fields, optionally generate a username and/or password, automatically log the member in and redirect them to the referrer or a specified page.
[pmpro_signup submit_button="Unlock this Post Now!" level="1" login="1" redirect="referrer"]
Installation and Setup
- PMPro Plus members can install the add on from the Memberships > Add Ons admin page.
- Or, download the plugin and upload the ‘pmpro-signup-shortcode’ directory to the ‘/wp-content/plugins/’ directory of your site.
- Activate the plugin through the ‘Plugins’ menu in WordPress.
- Edit the page, post or widget desired to add the shortcode.
The shortcode attributes include:
- hidelabels – (optional) Optionally hide the field “Labels”. The “placeholder” attribute of input fields will be used when available and the label will be shown for fields when required. (default: false; accepts: true or false)
- intro – (optional) Override the default “Register for” text above the checkout form or hide the text completely. (default: true; accepts: true, false, or your custom text)
- custom_fields – (optional) determines whether to show any Custom Fields added via Register Helper or other Add Ons. The shortcode only supports fields added to the following locations: after_username, after_password, after_email, and before_submit. (default: false; Accepts: true or false)
- level – (required) determines which level to use for the checkout form
- login – (optional) Set this attribute to show a “Log In” link below the submit button. (i.e. login=”1″)
- redirect – (optional) Set the page to redirect to after form submission. (default: Membership Confirmation page. accepts: referrer, account, or your custom URL)
- short – (optional) determines whether to show the Confirm E-mail and Confirm Password fields OR show E-mail Address field only. (default: false; Accepts: true, false, or emailonly)
- submit_button – (optional) Change the “Submit” button text on the checkout form. (default: “Sign Up Now”; accepts: your custom text)
- title – (optional) Show a heading (h2) with a default “Level Name” above the checkout form or your custom text. (default: false; accepts: true or your custom text)
If the level is free, the account will be created and the member will be automatically redirected to the specified redirect page. If the level is not free, the user will be taken to the membership checkout page to enter billing information.
Additional Action Hooks
If you need to show any custom text inside the shortcode area, there are two available action hooks: