Age verification on the website is very important when your website is about cannabis dispensary websites, alcohol-related websites, tobacco or vape stores, adult content websites, mature video games or gambling sites, certain pharmaceutical or supplement sites, and websites bound by legal age-restriction requirements.
You can easily add it to your WordPress website without any plugin. This is a very simple way to do it. For this kind of simple feature, we should not use any extra plugin. I will give you a simple code that you just need to add to your website. And then it’s done.
Step-by-Step Instructions:
First, login to your WordPress dashboard and go to:
Appearance → Theme File Editor → footer.php
Add the code below to your footer.php file and then just update it. Done.
Now you will see on your website an age verification popup, and if someone’s age is below the restricted age, they will automatically be redirected away from the website.
You can also change the style, layout, font, text, etc.
If you look at the code, the coding style is very simple, so you can easily understand where to change the text and where to change the design.