{CODICTS} Snippets is now available

Voxel Invite Code Field

The {CODICTS} Voxel Invite Code Field plugin adds an invite code system to Voxel Theme user registration. It lets you control who can sign up by requiring new users to enter a valid invite code — perfect for gated communities, beta programs, exclusive directories, and membership sites where you want to manage growth and ensure quality.

Installation & Activation

Start by downloading the plugin from the Downloads page on your dashboard on the CoDicts website.

After downloading, install and activate the plugin in WordPress by navigating to “Plugins” > “Add New” > “Upload Plugin” and selecting the downloaded zip file. Click “Install Now” and then “Activate”.

Once activated, a new “Invite Code” menu item appears in the WordPress admin sidebar.

Important: After activating the plugin, you need to complete two additional setup steps to connect the invite code field to your Voxel registration form. See the Connecting to Registration section below.


Key Features

FeatureDescription
Invite Code ManagementFull admin interface for creating, editing, and deleting invite codes.
Registration GatingBlocks registration unless a valid, unexpired, within-limit invite code is entered.
Usage LimitsSet how many times each code can be used, or allow unlimited uses.
Expiry DatesEach code has a date/time expiration — expired codes are automatically rejected.
Role RestrictionsRestrict each code to specific Voxel user roles (e.g., different codes for different membership tiers).
Usage TrackingSee how many times each code has been used and by whom.
Random Code GeneratorOne-click generation of random 8-character alphanumeric codes.

Connecting to the Registration Form

After activating the plugin, two manual steps are required to make the invite code field appear on the Voxel registration form.

Step 1: Add the Invite Code Field to the Profiles Post Type

1. Navigate to the Profiles post type editor in your WordPress admin: wp-admin/edit.php?post_type=profile&page=edit-post-type-profile&tab=fields

2. Add a new Text field to the Profiles post type.

3. Set the Field Key to exactly cvicf.

4. Save the post type.

Important: The field key must be exactly cvicf — this is how the plugin identifies the invite code field. If you use a different key, validation and usage tracking will not work.

Step 2: Assign the Field to User Roles

1. Navigate to Membership → User roles in the WordPress admin: wp-admin/admin.php?page=voxel-roles

2. Click “Edit” next to the user role you want to require invite codes for (e.g., Subscriber, Business, etc.).

3. In the Fields section, add the invite code field from the Available Profile Fields.

4. Save the role configuration.

5. Repeat for any other roles that should require invite codes.

Once both steps are complete, the invite code field will appear on the registration form for users registering under the configured roles.


Creating Invite Codes

Step 1: Open the Add New Form

Navigate to “Invite Code” > “Add New” in the WordPress admin sidebar.

Step 2: Set the Code

Enter an invite code in the Title field, or click “Generate Invite Code” to create a random 8-character alphanumeric code automatically.

Tip: Generated codes use uppercase letters, lowercase letters, and numbers — making them hard to guess. You can also type your own custom codes (e.g., WELCOME2025 or VIP-ACCESS).

Step 3: Configure Settings

SettingDescription
DescriptionOptional internal note about the code (e.g., “For beta testers” or “Event attendees”).
Select RolesCheck which Voxel user roles can use this code. Only users registering under a checked role will be able to use it.
Usage LimitMaximum number of times this code can be used. Set to 0 for unlimited uses.
Expiry Date and TimeWhen this code expires. After this date, the code will be automatically rejected.

Step 4: Save

Click “Save” to create the invite code. It is immediately available for use in registration.


Managing Invite Codes

Navigate to “Invite Code” in the admin sidebar to see all your invite codes in a list.

List Columns

ColumnDescription
TitleThe invite code string. Click to edit.
Usage / LimitShows current uses vs. maximum (e.g., “3 / 10”). Unlimited codes show “∞”.
Expiry DateWhen the code expires. Shows “–” if no expiry is set.
AuthorThe admin who created the code.
Date CreatedWhen the code was created.

Available Actions

Hover over any invite code in the list to see row actions: Edit to modify the code, or Delete to permanently remove it. You can also use the bulk delete action by selecting multiple codes with the checkboxes.

The list supports searching by code name and sorting by title, usage, expiry date, author, or creation date.


Viewing Who Used a Code

When you edit an invite code, a “Users Usage” table appears below the form. This shows every user who registered with this specific invite code, including their name (linked to their WordPress user profile), email address, and registration date.

This audit trail helps you track which codes are being used and by whom.


How Validation Works

When a user submits the registration form, the plugin checks the submitted invite code against four conditions. All four must pass for registration to proceed:

ConditionWhat Is Checked
Code existsThe submitted code must exactly match an existing invite code (case-sensitive).
Not expiredThe current date/time must be before the code’s expiry date.
Role allowedThe user’s selected registration role must be checked in the code’s role settings.
Within usage limitThe code’s usage count must be below the limit (or the limit must be set to 0 for unlimited).

If any condition fails, the user sees an “Invalid invite code” error and registration is blocked.

Note: Invite codes are case-sensitive. WELCOME2025 and welcome2025 are treated as different codes. Make sure users enter the code exactly as it was created.

The usage count is only incremented after the user account is successfully created. If registration fails for other reasons (e.g., email already taken), the code’s usage count is not affected.


Role-Based Code Restrictions

Each invite code can be restricted to specific Voxel user roles. This is useful for creating different codes for different membership tiers.

Example setup:

Invite CodeAllowed RolesUsage LimitPurpose
BETA-2025Subscriber50Beta program — basic accounts only
VIP-ACCESSBusiness, Premium10Premium partner invitations
OPEN-DAYAll rolesUnlimitedOpen registration event

If a user tries to register as “Subscriber” using the VIP-ACCESS code, they will see an “Invalid invite code” error because the code only allows “Business” and “Premium” roles.


Troubleshooting

“Voxel Theme Not Detected” Error

Ensure the Voxel Theme is installed and set as the active theme (or the active parent theme if using a child theme). Go to Appearance → Themes to verify.

Invite Code Field Not Appearing in the Registration Form

This is the most common setup issue. Make sure you have completed both setup steps:

1. Added a Text field with key cvicf to the Profiles post type in the Voxel post type editor.

2. Assigned that field to the relevant user role(s) under Membership → User roles.

If either step is missing, the field won’t appear on the form. Clear any page or object caches after making changes.

“Invalid invite code” Error During Registration

There are several possible causes:

CauseSolution
Code doesn’t existVerify the code exists as a published invite code in the admin.
Code is expiredCheck the expiry date in the admin and extend it if needed.
Usage limit reachedCheck the Usage / Limit column in the admin list table.
Wrong roleEnsure the code is enabled for the role the user is registering as.
Case mismatchCodes are case-sensitive. The user must enter the exact code as created.
Extra whitespaceEnsure there are no leading or trailing spaces in the code.

Usage Count Not Incrementing

The usage count only increases after the user account is successfully created. If registration fails for other reasons (email validation, other plugin conflicts, etc.), the count will not go up. This is by design to prevent false counts.

Users Usage Table Not Showing Registered Users

The user audit works by matching the cvicf profile field value to the invite code title. If the field key in the Profiles post type was changed from cvicf to something else, the audit query won’t find matching users. Make sure the field key is exactly cvicf.

Admin Menu Not Appearing

Ensure the plugin is activated and that you have Administrator-level access (manage_options capability). Check the WordPress error log for any PHP errors.

Random Code Generator Not Working

Check the browser console for JavaScript errors. The generator requires jQuery, which is included with WordPress by default.


For further support, visit codicts.com or contact us at support@codicts.com.

CoDicts Co., Ltd. © 2021-2026. All rights reserved