CM Registration (CMREG) - Shortcodes and creating the login button
On the WordPress dashboard navigate to CM Registration Pro → Shortcodes.
In the box the different shortcodes that can be used with the plugin are listed and described. The shortcodes are contained within square brackets like so... [example-shortcode].
[cmreg-login] - Add this shortcode to display a login button on pages or posts. Shortcode displays login button, optionally you can pass the button's text: [cmreg-login]Text[/cmreg-login]
[cmreg-login-form] - shortcode displays login form.
In the login form you can also add a link and label to redirect users to the registration form
[cmreg-login-form registration-url="/registration" registration-link="Click here to register"] - shortcode displays the login form. Optional attributes will produce a link to the registration page. You can also pass text or HTML that will be displayed for the logged-in users instead of the login form by putting it between the shortcode tags: [cmreg-login-form] You are already logged-in[/cmreg-login-form]
[cmreg-registration-form] - shortcode displays registration form.
In the registration form you can also add a link and label to redirect users to the login form
[cmreg-login-form registration-url="/registration" registration-link="Click here to register"] - shortcode displays the login form. Optional attributes will produce a link to the registration page. You can also pass text or HTML that will be displayed for the logged-in users instead of the login form by putting it between the shortcode tags: [cmreg-login-form]You are already logged-in[/cmreg-login-form]
[cmreg-lost-password] - shortcode displays lost password form.
[cmreg-registration-btn] - shortcode displays the registration button and the registration form is being opened in the overlay after clicking the button.
Edit Profile Form
[cmreg-edit-profile] - shortcode displays the form that registered users can use to update their profile information.
[cmreg-social-login] - shortcode displays the button that site visitors can use to login using Facebook.
Create Invitation Code [cmreg-create-invitation-code]
[cmreg-create-invitation-code] - shortcode displays the form that a user can utilize to invite his friends or just create the invitation codes.
expiration - set the invitation code's expiration date in format YYYY-MM-DD HH:MM:SS or give the time period as 30 days. You can use the following English words: minutes, hours, days, weeks, months or years.
userslimit - number of users that can use the invitation code
verifyemail - one of: global, 1, 0. Whether to require a user registered by this code to verify his email address.
emailinput - 0 or 1 - whether to show the email address input field to send the invitation code to or not.
role - set a Wordpress role that a user registered with this invitation code will be assigned to. If empty then use the role from the plugin settings.
showparams - 0 or 1. Show the parameters that the invitation code will have.
Show invitation codes created by user [cmreg-list-users-invitations]
[cmreg-list-users-invitations] - shortcode will produce the table with all invitation codes created by the current user.
Login and registration buttons
You can add the login action on any link using the following URLs (href attributes):
#cmreg-login-click will produce both login and registration form in the overlay.
#cmreg-only-login-click will produce only the login form in the overlay.
#cmreg-only-registration-clickwill produce only the registration form in the overlay.
The following example is showing how to add the separate Login button and the Registration button to your Wordpress menu (wp-admin Dashboard -> Appearance -> Menus):
You can add also the button which will show the login and registration forms at once:
This will produce the new menu links on the front-end:
Notice: the login buttons will be replaced by the Logout buttons when the user is logged-in.
Clicking on each link will show the login or/and registration forms up floating over the website content: