How to Add a Free Age Verification Feature to Your WordPress Website
-
Tohidul Pappu
- 1 Minutes
- Website Solutions | WordPress
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.
Are you 21 or older?
You must be at least 21 years old to enter this site.
Tohidul Pappu
Founder of TIWebView www.tohidul.info
Learn & Share
RELATED POST

10 Bad Habits to Drop When Learning Web Development
Share on Facebook Share on Twitter Share on Linkedin Share on Email Web Development is one of the demandable skills right now. And today’s young people want to be a Web Developer. Most of the young people want to learn web development because of the huge level of earning. That’s

Top 10 Website Security Tips You Should Follow
Share on Facebook Share on Twitter Share on Linkedin Share on Email Right now, website security is one of the major issues for websites. If you make a website, you have to secure it properly. But unfortunately, most people just ignore security optimization. If you invest so much money to
About Me
Hi, I’m Tohidul Pappu, an experienced web developer with a great portfolio, having successfully developed over 500 live websites. I enjoy sharing my knowledge to help others who want to work in web development by offering advice, guidance, and solutions the problems along the way.


