how-to-create-wp-age-verification

How to Create Age Verification in WordPress

The regulations on age-restricted trading are constantly changing, and it is the responsibility of businesses to keep their adult products and services away from the eyes of minors.

If you want to effectively manage who visits your website, you may need age verification, also known as an age rating, to hide your adult content from underage users.

Before we get into how to create an age verification with a plugin, let’s first discuss when you need to restrict access from underage users.

When do you need age verification?

While it’s great to have lots of visitors to your website, there’s also a problem: how do you keep children away from your adult content?

For most brands, setting a minimum age on their website to prevent minors from viewing their content or purchasing their products is the best way to do this. A good example is the Brooklyn Brewery website, which redirects you to a rejection page if you do not verify your age.

Alcohol, explicit content and online gambling are three big examples of content that needs age restrictions. Another case of age verification is the offering of competitions or memberships where the winner or member must be of a certain age.

To create an age verification popup, you can install a plugin that allows you to easily set up an age rating for your WordPress website. Among the numerous free plugins available in the WordPress repository, Age Gate is one of the most popular tools. Let’s now find out how you can add an age rating with this plugin.

Check the age of users with the Age Gate plugin

Age Gate offers a complete solution to verify the age of users when they come to your website. Before you start creating an age verification, you need to install the plugin.

First, go to Plugins → Add New in your WordPress dashboard. Then search for “Age Gate” and click Install and Activate.

ppwp-age-gate-plugin

Once activated, the plugin will be added to your WordPress dashboard, directly in the navigation menu. You can click on it to access the Settings page.

There are many settings options to configure, including the main restriction settings, the age verification message, the appearance of pop-ups, advanced settings and access settings.

You need to configure the basic settings for an age check on the restrictions page, otherwise your age check will follow the default settings of the plugin.

ppwp-age-verification-restriction-settings
  • Default age – The minimum age for verification. This number depends on the content you offer or the regulations you follow. Tobacco websites, for example, usually only allow people under the age of 21 to view and purchase their products.
  • Restrict – You can apply the age verification restriction either to the entire content of the website or to selected posts. For example, beverage websites allow all visitors, including teenagers, to view and purchase their food and drinks. However, they will determine if their customers are old enough to read pages about alcoholic beverages and make purchases.
  • Different ages – This setting option allows you to assign a specific age to certain content. For example, people over the age of 18 can access some pages and posts, while the rest of the site will not allow U21 users to see the content.
  • Age confirmation with – Visitors can confirm their age in 3 different ways: Entering their age, selecting their age from a drop-down list, or simply clicking the Yes/No buttons.

If you don’t want your readers to have to enter their age every time they visit your website, simply activate the “Remember me” option. After the initial verification, visitors can freely visit your website without having to confirm their age. You can also save your visitors from having to activate this option themselves by activating the “Remember me automatically” checkbox.

Click on the Save changes button when you have finished configuring the settings. When someone visits your website, an age verification pop-up will appear. The pop-up window looks like this:

ppwp-age-verification-screen

Since the default age verification screen is not really eye-catching, you can customize the age verification pop-up to make it more user-friendly. You should therefore also take a look at the other settings areas.

Customizing the age verification message

The configuration of the age verification screen and message is available on the Message and Appearance tabs of the plugin settings page.

The message settings options allow you to display a title, subheading, terms and conditions, privacy policy and other information in your verification popup. There are some standard verification messages that you can view, such as Invalid Submissions, Underage or General Error, etc. After you have made changes, click the Save button to save your customized configuration.

ppwp-age-gate-message

With the settings on the “Appearance” tab, you can change the background color, foreground color, background image, text color, etc.

ppwp-age-gate-appearance

Advanced settings for age verification

It is not a necessity to change the settings on the Advanced tab unless you are having issues with the age verification page. Conflicts with WordPress caching plugins or the WordPress hosting cache are the most common problems. By activating the JavaScript version, these kinds of problems can be easily solved.

There are other advanced settings such as Gutenberg support, anonymous age verification and custom CSS rules.

ppwp-age-gate-advanced-settings

Age verification for certain posts

To add a custom age on specific pages and posts, follow the 5-step guide below:

  1. Enable the Different ages option on the Restrictions page
  2. Go to the edit page of the post or page to which you want to assign a custom age
  3. Click on Change in the Age limit options field
  4. Enter a custom age
  5. Click OK and Update to save your changes
ppwp-custom-age-verification

Conclusion

If you sell products and services that are intended for adults, or offer content that is likely to be unsuitable for a younger audience, setting up age verification for your website should be a priority.

We’ve shown you how to set up age verification for your WordPress website using the Age Gate plugin. Not only can you customize the verification pop-up, but you can also specify custom ages for specific pages and posts.