How to allow user registration with invitation code?

How-to-allow-registration-only-with-an-invitation-code

Invitation Codes can be extremely useful if you are looking for a way to provide exclusive access to certain visitors to your website. You can also conveniently assign different user roles for different users depending on the invitation code they have. Since WordPress doesn’t allow it by default, you are going to have to manually add the function to your site. The easiest way to enable user registration with invitation code is simply by using a plugin. You can use the User Registration plugin for this purpose.

It is a free WordPress user registration plugin which allows you to create custom registration pages in no time. Due to its clean and user-friendly interface, it is quite intuitive to use while being feature-rich at the same time. All you need to do is install the Invite Codes add-on and you will be able to have user registration with invitation code for your site.

1. Install the User Registration Plugin

First of all, you will need to allow registration for your WordPress site. You can simply do that by going to the Settings page through your admin sidebar. In the General Settings, look for the Membership option and make sure to check the box beside ‘Anyone can register’.

User Registration

Now, you will need to install the User Registration Plugin which is actually quite easy. From your Dashboard, go to Plugins>>Add New and enter ‘User Registration’ in the search bar. You should now be able to find the plugin below. Click on the ‘Install Now’ button and wait for it to finish installing. Finally, wait until a button labeled ‘Activate’ appears and click on it.  

Install Plugin

2. Get the Invite Codes extension.

The next step is to buy the Invite Codes extension for this plugin. With this, user registration with invitation code will be possible. It also allows you to set a certain limit to the number of uses for a single invitation code. Not only that, but you can also choose expiration dates for your invitation codes. You will also be able to easily set specific user roles for people according to their invitation code. All in all, it’s a very handy tool that is user-friendly at the same time.

Go to User Registration>>Extensions from your sidebar and scroll down to find the Invite Codes extension. It will redirect you to the page for Invite Codes extension. Now, click on the ‘Buy Now’ button in order to open a page containing the information on various packages for the User Registration Plugin including their pricing details. Select one that suits you the best and purchase it.

Once you are done with that step, you should have a zip file containing the Invite Codes extension. You will now need to install it. From your sidebar, go to Plugins>>Add New and click on the ‘Upload Plugin’ button towards the top. Now, click on the Browse button which has just appeared. You can now select the zip file for the Invite Codes and upload it to WordPress from here. Afterward, click on the ‘Install Now’ button right beside it in order to start the installation process. Once it is over, just click on the ‘Activate Plugin’ button and you will be able to use the Invite Codes extension.

Invitation Codes

3. Add Invitation Code field to the User Registration form

Now, you will be able to add a field in your user registration forms where the visitors can enter the invitation codes. In order to do that, you need to first create a form by going to User Registration>>Add New. The User Registration plugin allows you to easily and intuitively create forms from this page using its drag-and-drop interface.

In order to add a field for Invite Codes, you will need to scroll down and find the Invitation Code field in the Extra Fields subsection. Simply click on it and drag it to where you want it to be. This field will now make user registration with invitation code available for the form.

Invite Codes

You can now click on the newly created Invitation Code field to bring up the options for the field. By editing the label, you can change what it says in place of ‘Invitation Code’. From here, you can also add a description for the field and change the placeholder text. Below that, you can also find the option to make the Invitation Code a required field. There is also the option to hide the label entirely if you want.

Invitation Codes

Once you are done, you should be able to find the button to ‘Create Form’ on the top-right or the bottom-right of this screen.

4. Create the Invitation Codes

You will now need to create the invite codes, of course. First of all, go to the User Registration>>Settings through your sidebar and click on the ‘Invite Codes’ tab. From this page, you will be able to create, edit and manage your invitation codes.

Create Invite Codes

From the ‘Add New’ page, you can manually create new user registration invitation codes. You can set the invitation code by adding it to the ‘Add New Code’ field. The ‘User Limit’ field allows you to change the number of users that can use the same code. If you leave it empty, the code can be used an infinite amount of times. Similarly, you can set the Expiry Date for the code. Leaving it empty means that the invitation code will never expire.  

Below that you can use the ‘Select Form’ field in order to set the form for which the code will be valid. Use the drop-down list and select the user registration form you want. Finally, you can use the ‘User Role’ field to select the role to be assigned to the visitors who use the invitation code.

Add Invite Code

Instead of individually adding new invitation codes, sometimes you might just want to generate a bunch of codes at the same time. Fortunately, you can go to the ‘Generate Random Codes’ page and do just that.

Using the ‘Code Numbers’ field, you can set the number of codes to be created. The ‘Code Prefix’ field allows you to add a prefix to all the generated codes in order to make them more distinct. Like the manually generated codes, you can also set the user limits, expiry date, and permission provided by the code. Like before, you will need to select the form for these codes as well.

Generate Invite Codes

5. Insert the form into your site

Once you have created a form with an invitation code field as well as some actual invitation codes, you will now need to actually add the form to your site. You should be able to do it without any difficulty through Shortcodes.

Through your sidebar, go to the User Registration page and you will be able to see the list of forms that have been created. Besides the title, you will be able to see the shortcode for the forms. Simply copy that code and paste it into whatever page or post you want using the editor.

User Registration Shortcode

Once you have done this, your visitors will be able to see the form that you have created and user registration with invitation code can be possible.

6. Manage your Invitation Codes

If you go back to the ‘Code List’ page after creating some invite codes, you can see them listed out.  You can also check their creation and expiry date, whether they are active or not, the user role they provided, as well as the user count for each of the codes. If you want to edit or delete the existing invite codes, you can do that from here as well.

Invite Codes

Additionally, if you to the Users>>All Users page through the Dashboard, you will able to the current list of users, their roles, alongside the invite code they used. You can keep track of what invite codes were used by whom quite easily.

Invite Codes

This way, user registration with invitation code can be possible for your site by using the User Registration WordPress plugin alongside the Invite Codes add-on.

Avatar

WPEverest Author

Leave a Reply

Your email address will not be published. Required fields are marked *

Scroll to top

Pin It on Pinterest