This tutorial explains how to make a user-registration form. So visitors can register as users at your WordPress-powered website.
To make any USP Form a user-registration form, follow these two easy steps.
First, include the
[usp_name] shortcodes in the form. These are required for registration. Other fields may be added as desired.
Then include the required hidden field in the same form:
<input name="usp-is-register" value="1" type="hidden" />
Done! Of course, you may also want to include other useful fields, such as seen in this form example:
[usp_url] [usp_captcha] [usp_custom_field form="register" id="1"] [usp_custom_field form="register" id="2"] [usp_custom_field form="register" id="3"] [usp_custom_field form="register" id="4"] [usp_custom_field form="register" id="5"] [usp_custom_field form="register" id="6"]
The six custom fields define various user-registration fields. Specifically:
name#nicename|for#nicename|label#Nicename|placeholder#Nicename name#displayname|for#displayname|label#Display Name|placeholder#Display Name name#nickname|for#nickname|label#Nickname|placeholder#Nickname name#firstname|for#firstname|label#First Name|placeholder#First Name name#lastname|for#lastname|label#Last Name|placeholder#Last Name name#description|for#description|label#Description|placeholder#Description
Here we have six custom-field definitions, one for each of the six shortcodes included in the previous form example. These custom fields are configured to collect data for the user’s profile, including First Name, Last Name, Nickname, Description, and so on. Check out the list of registration shortcodes for more details.
When a user registers with any WordPress site, they are assigned a specific role. Which role a user is assigned depends on many factors, including WP settings and things that plugins and your theme may be doing. Assuming a default WordPress installation, here is how roles are assigned when USP Pro is active:
- If a user registers via USP form, they will be assigned the role specified via the plugin setting, “Default Assigned Role” (USP General tab)
- If a user registers directly via WP (via the Login/Register screen), then the user will be assigned the role specified via the WordPress setting, “New User Default Role” (WP General settings)
Keep in mind that this applies to a default WP install with only USP Pro active. So if there are other plugins active, their functionality may modify the logic outlined above.
- USP Pro includes a complete, ready-to-go User Registration Form. Check it out in the WP Admin Area under “USP Forms”.
- USP Pro includes a plug-n-play Login/Register/Password form that can be added to any Post or Page via simple shortcode.
- When registering users, WordPress takes care of all the password-generation and notification emails. You can use USP Hooks to customize some aspects of default notification functionality, such as who receives the notification email, length of WP-generated password, and so on.
- If necessary, developers may implement custom passwords for user-registration by overriding default functionality (see the Codex example for redefining the user-notification function). For more info, read the Notice near the top of this post.
- Enable Users to Register
- Combo Form: Submit Content and Register User
- Combo Form: Contact Form with User Registration
- Set Values with Hidden Fields
- Override Global Registration Settings
- USP Pro – Login/Register/Password Form
- USP Pro – Password Field
- USP Pro Custom Fields – User Registration Attributes