Shortcodes

Shortcodes List

Paid Member Subscriptions comes with a list of shortcodes that you can use right away:

  • [pms-register] – Generates a Registration form that allows users to subscribe to your Subscription Plans
  • [pms-login] – Generates a Login Form
  • [pms-logout] – Displays the Front End Logout Text and Link
  • [pms-account] – Generates the Account Form that allows the users to manage their information and Subscription Plans
  • [pms-subscriptions] – Generates the List of Subscription Plans Form which allows logged in users to subscribe
  • [pms-recover-password] – Generates the Recover Password Form
  • [pms-restrict] – Restricts content inside a post or a page so you can have content that’s protected and content that’s not protected in the same page
  • [pms-payment-history] – Adds a Front End Table with the Member’s Payment History
Shortcodes work only on pages that are created by the Admin. This is to prevent users, who can post but are not Admins, from using them.

Member Registration form

In order to generate the Registration Form follow the steps below:

  • Create a new page and name it appropriately, for example Register or something similar
  • Add the [pms-register] shortcode inside using the Text Editor (not Visual)
  • Hit “Publish” and you’ll be prompted with a Registration Form in the Front End

All the Subscription Plans created in Paid Member Subscriptions -> Subscription Plans will be displayed inside the Registration Form.

Paid Member Subscriptions - Shortcodes - Registration Form

Front End Registration Form

Paid Member Subscriptions - Shortcodes - Registration Form in Front End

Parameters

1
[pms-register subscription_plans="" plans_position="" selected=""]
  • subscription_plans – A comma separated list of Subscription Plans IDs to list only certain Subscription Plans, or you can use “none” to allow users to register without becoming members (to not list any Subscriptions Plans). If this attribute is not set, all active Subscription Plans will be displayed
  • plans_position – Where to display the Subscription Plans in relation to the Register fields. The parameter can use the values “bottom” or “top” and the default is set to bottom
  • selected – The ID of the Subscription Plan that should be selected by default when we display the Register form. By default no Subscription Plan is selected

Example of parameters used inside the [pms-register] shortcode

1
[pms-register subscription_plans="17,18,19" plans_position="top" selected="18"]

The above shortcode, will create a Registration Form that will list the Gold, Silver and Free Subscription Plans and position them above the rest of the fields. By default the Silver Subscription Plan (with the ID 18) is selected.

Paid Member Subscriptions - Shortcodes - Registration Form Parameters

Allow Users to Register via Paid Member Subscriptions

In order to let users to register on your website you must enable the “Anyone can register” option.

For this, in the WordPress Admin Interface, go to the Settings -> General tab and under Membership make sure to check Anyone can register. Save changes and your website will now allow User Registration.

Paid Member Subscriptions - Shortcodes - Allow Registration

Allow Users to Register via Paid Member Subscriptions on Multi Site

In order to let users to register on your Multi Site you must enable the “User accounts may register” option.

For this, in the WordPress Admin Interface, logged in as Super Admin go to My Sites -> Network Admin -> Settings -> Network Settings tab and under “Allow new registrations” make sure to check User accounts may be registered. Save changes and your Multi Site will now allow User Registration.

Paid Member Subscriptions - Shortcodes - Allow Registration on Multi Site

Allow Users to Register without becoming Members

You can allow users to register on your domain without subscribing to a Subscription Plan by using the “none” value inside the subscription_plans parameter like so: [pms-register subscription_plans=”none”].

All users that will use this Registration Form will register as a normal user.

Paid Member Subscriptions - Shortcodes - Registration Form without Subscription Plans

Login Form

In order to generate the Login Form follow the steps below:

    • Create a new page and name it appropriately, for example Login or something similar
    • Add the [pms-login] shortcode inside using the Text Editor (not Visual)
    • Hit “Publish” and you’ll be prompted with a Login Form in the Front End

The Login Form allows your users to login from the Front End of WordPress, instead of the default WordPress Login Form.

Paid Member Subscriptions - Shortcodes - Login Form

Front End Login Form

Paid Member Subscriptions - Shortcodes - Login Form in Front End

Parameters

1
[pms-login redirect_url="" logout_redirect_url="" register_url="" lostpassword_url=""]
        • redirect_url – Will redirect the user to an url of your choosing after a successful login
        • logout_redirect_url – Will redirect the user to an url of your choosing after log out
        • register_url – Adds a link to the Register Form
        • lostpassword_url – Adds a link to the Recover Password Form

Redirect User after Login

Paid Member Subscriptions makes it really easy to redirect users after login to any URL by using the redirect_url parameter.

Example:

1
[pms-login redirect_url="https://www.yourdomain.com/account"]
The redirect will NOT work if it’s pointing to an outside URL, it needs to point to a page on your site.

Add Register and Lost Password? links below the Login form

You can add a “Register” and a “Lost your password?” link below the Login form using the register_url and lostpassword_url parameters.

Example:

1
[pms-login register_url="https://www.yourdomain.com/register/" lostpassword_url="https://www.yourdomain.com/recover-password"]

Front End Login Form

Paid Member Subscriptions - Shortcodes - Login Form using Parameters

Logout Link

In order to generate the Logout Link follow the steps below:

        • Create a new page and name it appropriately, for example Logout or something similar
        • Add the [pms-logout] shortcode inside using the Text Editor (not Visual)
        • Hit “Publish” and you’ll be prompted with a Logout Link in the Front End

The Logout Link allows your users to logout from the Front End of WordPress.