WordPress Invitation Code - How To - Limit Codes to Four Digits


Limiting Codes to Four Digits

Back to User Guide

Quick Read

  • You can switch between codes with four digits or long ones.
  • It's not possible to use long codes when the four-digits code mode is on.

What is This Feature

It's possible to switch between two types of code:

  • Long codes
  • Four-digit codes
Example of the 4 digit invitation code - Invitation Code Registration for WordPress
Example of the 4 digit invitation code

This feature was added in version 1.2.4 of WordPress Invitation Code plugin. This mode causes some majors changes and this article will address them.


Settings

Head to Admin Dashboard → Invitation Code Content Access → Settings → General tab.

Navigation to plugin settings - WordPress Content Restriction
Navigation to plugin settings

Only three settings are relevant to us, you can find them under the Code Specifications section:

Code specifications settings - Private Content WordPress Plugin
Code specifications settings
  • Enable four digits invitation code - Codes will have four digits only. They are not case-sensitive. As such, abc1 is the same as ABC1.
  • Show prefix before four digits codes - If enabled, four-digit codes created sequentially can have prefixes. 
    • Example without prefix: 0000, 0001
    • Example with prefix: seq0000, seq0001

      Prefix Enabled Changes Access Code Box

      If enabled, the field "Enter prefix" will be shown too. For the code seq0000, the user will have to input seq 0 0 0 0, as shown:

      Adding prefix to invitation codes - Restrict Content Plugin
      Adding prefix to invitation codes
  • Four digits invitation code pattern - Only works if "Enable four digits invitation code" is enabled. You can choose which characters will be included:
    • Numbers and letters (0-9 and A-Z)
    • Numbers only (0-9)
    • Letters only (A-Z)

What Happens When You Turn On Four-Digit Codes

  • New codes will be generated with four characters only
  • The code box will change and ask for four digits only
  • Codes with more than four digits WILL NOT work

What Happens When You Turn Off Four-Digit Codes

This is important.

  • New codes will be generated with multiple characters
  • The code box will revert back to original
  • Codes created during Four Digits Mode (with only four characters) WILL work

TIP: Choosing What Codes The Access Form Will Request

You can change the Content Access Form so that it asks either the long codes or the four-digit codes.

Different views of the access code box - WordPress Register with Invitation Code
Different views of the access code box

To do so apply the shortcode   [cmicca_access_code]  with the view parameter.

  •  [cmicca_access_code view=four]  - The form will ask for long codes
  •  [cmicca_access_code view=four]  - The form will ask for codes with four digits

Learn more about the shortcode: WordPress Invitation Code - How To - Display Content Access Form (Shortcode)


More information about the WordPress Invitation Code Plugin

Other WordPress products can be found at CreativeMinds WordPress Store

Let us know how we can Improve this Product Documentation Page

To open a Support Ticket visit our support center
Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.