TUTORIAL

How to Register Users with Invitation Code in WordPress?

Last Updated: 8 mins By: Anisha Maharjan

Registering users with an invitation code in WordPress makes it easy to limit registration and provide exclusive access to specific users.

While WordPress doesn’t natively support invitation codes, you can add this functionality with plugins like User Registration.

In this guide, we’ll walk you through the steps to register users with invitation codes using User Registration.

Let’s jump right into it!

How to Register Users with an Invitation Code in WordPress?

Since WordPress doesn’t have the invitation code feature by default, you’ll need a plugin like User Registration.

Not only does it allow for custom registration pages, but its Invite Codes add-on also simplifies the process of registering users via invitation codes.

So, let’s get started.

1. Install the User Registration Pro Plugin

Before we start, we should point out that you can only register users with an invitation code with the premium version of User Registration.

You’ll need to buy a premium plan to access the Invite Codes add-on, which allows you to create and add invitation codes to your registration forms.

Go to User Registration’s official pricing page and buy a Plus plan or above. You must choose the Plus plan or Professional Plan since the Invite Codes add-on is only available in these plans.

Once you’ve bought a plan, you need to install and set up the pro plugin on your website. You can refer to our complete guide on how to install and set up User Registration properly.


2. Install and Activate the Invite Codes Extension

After you’ve installed User Registration Pro, open the Dashboard >> All Features tab on your WordPress dashboard.

Go to All Features in Dashboard

You’ll end up on the same page if you navigate to User Registration >> Extensions.

Here, search for the Invite Codes add-on from the list of available features and add-ons. Simply Activate the add-on, and it’s ready for use.

Activate Invite Codes Add-on

3. Create the Invitation Codes

With the initial setup complete, your next step will be creating the invite codes. Otherwise, your users won’t have any code to register with.

To do that, go to User Registration >> Settings through your sidebar and click the Invite Codes tab.

Go to User Registration Settings

This will take you to the Codes List page, where you can view, edit, and manage your invitation codes.

Open Invite Codes Settings

However, to manually create new user registration invitation codes, click on the Add New page. You’ll see a bunch of options that enable you to create a new invitation code.

Add New Invite Code

To help you understand how it works, we’ve created a new code in the image above. The code we’ve added is SALE2024. It has a user limit of 12 unique users and expires on October 31, 2024.

  • User Limit: Change the number of users who can use the same code. If you leave it empty, the code can be used infinite times.
  • Expiry Date: Set the date as needed. Leaving it empty means that the invitation code will never expire.
  • Select Form: Set the form for which the code will be valid. For now, the dropdown list only has the Default Form. However, that’ll change once we create a custom form later in this tutorial.
  • Override User Role: Enable this option if you need to change the default user role for the selected registration form. Otherwise, disable it.
  • User Role: Select the WordPress user role to assign to visitors who use the invitation code.

You can also generate multiple codes simultaneously instead of individually adding new invitation codes. To do that, click the Generate Random Codes tab under Invite Codes.

Generate Random Codes - Register Users with Invitation Code in WordPress
  • Code Numbers: Set the number of codes to be created.
  • Code Prefix: Add a prefix to all the generated codes 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. As before, you’ll need to select the form for these codes as well.

Besides that, you’ll see a Raw List tab beside Generate Random Codes, where you can view the Code Details.

Raw List of Invite Codes

And with that, you’ve successfully created a valid invitation code for your registration form with the invitation code field.


4. Create a New Registration Form with Invitation Code Field

Of course, you first need a registration form for users to register on your website.

So, to create one, start by going to User Registration >> Add New.

Create Registration Form from Scratch

Here, you can build a form from scratch or pick a template to customize. For this tutorial, let’s select Start from Scratch.

Give your form a name and press Continue.

Give Name to Registration Form

As you can see, the form on the right already has four default fields: Username, User Email, User Password, and Confirm Password.

Add New Fields to Registration Form

If you need more fields, drag and drop the ones you see on the left and add them to your form. Then, hit Publish form.

To add a field for invite codes, scroll down and find the Invitation Code field in the Extra Fields subsection.

Find Invitation Code Field

When you click on it, you’re prompted to set up the invite code first to unlock the field. So, select Add Invite Code.

Set Up Invite Code

You’re returned to User Registration >> Settings >> Invite Codes. Here, Edit the code you previously created.

Edit the Coupon Code

Then, select the current form in Select Form.

Select Registration Form for Invite Code

Save the changes and go back to the builder.

Now, drag the Invitation Code field to the desired form row. Your users must enter their invitation code into this field while registering.

Add Invitation Code Field to Form

After completing the form, hit the Update form button at the top of the form builder.

Update Form After Creation

5. Customize the Invitation Code Field

Now, click on the Invitation Code field to bring up its Field Options. The field options have two settings: General and Advanced.

General Settings

By editing the Label, you can change what it says in place of ‘Invitation Code.’

Field Options for Invitation Code

From here, you can also add a Description for the field and change the Placeholder text.

Below, you’ll find another option to make the invitation code a Required field. Moreover, you can Hide the label entirely if you want.

You can also Enable Tooltip for the field and add the Tooltip Message.

Advanced Settings

The Advanced Settings allows you to add Custom Class to the field. You can also enable the field to be dynamically populated.

Advanced Settings for Invitation Code

Similarly, you can customize the rest of the fields in the form per your requirements.

Finally, click the Update Form button on the top right.


6. Configure the Settings for Your Registration Form with Invitation Code

Next, configure the registration form settings on the Form Settings tab.

Under the General tab, you can configure the User Approval and Login Option, set Default User Role, Enable Strong Password, edit the Submit Button Text, and more.

Configure General Form Settings

Similarly, right below the General tab is the Extras tab. Here, you get to Enable Reset Button, Enable Form Field Icon, Activate Auto Generated Password, and so much more.

Configure Extras Form Settings

You can configure these settings, update the changes, and move on to your next step!


7. Insert the Form into Your Site

Once you’ve created a form with an invitation code field and some actual invitation codes, you’ll need to add the form to your site.

To do so, click on the Embed button at the builder’s top.

Embed Registration Form with Invitation Code

This opens a popup prompting you to select an existing page or create a new one to embed the form.

Let’s create a new page for this tutorial by clicking Create New Page.

Create New Page for Embedding Form

Then, give the page a title and press the Let’s go! button.

Name of the New Page

This automatically creates the page and adds the form to it.

Publish New Registration Form

Finally, publish the page, and you’re done!

Once done, you can register users with invitation codes on your WordPress site.


8. Manage Your Invitation Codes

There’s one more thing left for you to do: manage your invitation codes.

Hence, go to User Registration >> Settings >> Invite Codes. You’ll see the Codes List page, where every code you’ve created will be listed.

Check Invite Codes List

From here, you can check their creation and expiry date, whether they’re active or not, their user role, and the user count for each of the codes.

You can even edit or delete the existing invite codes from here.

Additionally, go to Users >> All Users to see the current list of users, their roles, and the invite code they used.

Manage All Users - How to Register Users with Invitation Code in WordPress

From there, you can easily track which invite codes were used by which user.


Put this Guide into Action

This ends our easy guide on registering users with invitation codes in WordPress.

So, what are your thoughts on it? Comment below.

We have more articles like this on our blog, detailing all of the ways you can use User Registration for your site.

For instance, check out our guides on how to add extra fields to WooCommerce registration forms and how to enable admin approval for them.

How to Register Users with Invitation Code in WordPress?

Anisha Maharjan

A Writer and Editor with an imaginative flair. You'll find her sketching, reading, exploring new music, and unwinding in cozy cafes in her free time.

Leave a Reply

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

Empty playlist!
Scroll to top

Pin It on Pinterest