Age Gate


There are many uses for restricting content based on age, be it movie trailers, beer or other adult themes. This plugin allows you to set a restriction on what content can been seen or restricted based on the age of the user.


  • Ask users to verify their age on page load
  • SEO Friendly – common bots and crawlers are omitted from age checks
  • Choose to restrict an entire site, or selected content
  • Select a different age on individual content
  • Allow certain content to not be age gated under “all content” mode
  • Three choices for input; dropdowns, input fields or a simple yes/no button
  • Customise the order of the inputs based on your region (DD MM YYYY or MM DD YYYY)
  • Allow a “remember me” check box if desired
  • Ability to omit logged in users from being checked
  • Add your own logo
  • Update the text displayed on the entry form
  • Select background colour/image, foreground colour and text colour
  • Use built in styling out of the box, or your own custom style
  • Ability to add legal note or information to the bottom of the form
  • Redirect failed logins to a URL of your choice e.g. an alcohol awareness website.
  • Ability to use a non caching version
  • Various hooks to add even more customisation such as additional form fields
  • Compatible with multilingial plugins WPML and Polylang


  • An example of Age Gate
  • The Restrictions settings page
  • Age Gate has a variety of customisable message settings
  • The appearance can be tailored to fit your website
  • Advanced options include the use of a JavaScript Age Gate and a custom CSS editor
  • Manage what users can change Age Gate's setting, restrict posts and exclude settings from certain post types.


  1. Upload the ‘age-gate’ folder to the ‘/wp-content/plugins/’ directory
  2. Activate the plugin through the ‘Plugins’ menu in WordPress
  3. Visit ‘Age Gate’ admin section and adjust your configuration.

Be sure to check the ‘Access’ settings tab to grant permissions and omit any post types you don’t wish to display Age Gate options on.


Installation Instructions
  1. Upload the ‘age-gate’ folder to the ‘/wp-content/plugins/’ directory
  2. Activate the plugin through the ‘Plugins’ menu in WordPress
  3. Visit ‘Age Gate’ admin section and adjust your configuration.

Be sure to check the ‘Access’ settings tab to grant permissions and omit any post types you don’t wish to display Age Gate options on.

I can’t get past the Age Gate / The Age Gate only worked once

The most likely cause for this is caching on your site either via a plugin or your hosting provider. If the Age Gate appears stuck try using the JavaScript mode in the advanced tab and clear any caches.

Can I restrict a particular page?

You can. If you use selected content, a checkbox will appear in content pages

Can I add my own logo/branding?

Of course, it’s your site

I’m in X country, can I format the date style?

Yes! DD MM YYYY and MM DD YYYY are supported along with a choice of how the dates are entered.

I use caching, will that be affected?

From version 1.4.0 those using caching can select the “Cache Bypass” option to allow age gating even with caching on. Be sure to empty your cache when making changes to the plugin settings. From 2.0.0 this option is in Advanced -> Use uncachable version


A Couple of Improvements Needed, but 5 Stars Nevertheless

Started off using this plugin last week, and whilst it SEEMED to work, there was no apparent way to confirm this – until today when I managed to collar the author whilst he was answering support threads.

Turns out that the Age-Gate was working correctly all along – it just needed a bit of messing around to see it working.

Forget seeing it working more than once on the install that you’re logged in from – it just won’t happen. You need to use a second browser to see it working properly, or log out from your installation, close the browser, open the browser, log in, and then you should be able to see it again.

Hardly the prime scenario for editing, which is where the first improvement comes in – there should be a ‘view Age Gate’ option in the appearance settings.

The other improvement is in the front end after installation, regarding the ‘Age-Gate’ option, sitting next to Yoast, your caching plugin, and possibly even a page builder.

Whilst these all are helpful additions, Age Gate is most definitely NOT helpful, and should respectfully be relegated to back-end use only.

Other than that, Age Gate was really easy to set up, single pages and posts can be ‘age-gated’ from a panel in each post/page, making setting it up a breeze – far less time in fact than it took to write this review.

Five stars despite the two recommendations, which would push it up to seven stars if they were both made available 🙂

Well done!

Started with my own age checker. Then decided to first check the WP repository and found this super Easy plugin. Installed, a few minor CSS tweaks and I was good to go!

Many settings, everything I wanted for my own age checker was there and much more!

A breeze to setup, very impressive for a free plugin. Keep it up!

Awesome, Worked Like Charm

This is my second time reviewing a plugin that surprisingly work like charm… Lovely plugin, works as expected … fast and very helpful support as well. Kudos to the team

Read all 19 reviews

Contributors & Developers

“Age Gate” is open source software. The following people have contributed to this plugin.


“Age Gate” has been translated into 7 locales. Thank you to the translators for their contributions.

Translate “Age Gate” into your language.

Interested in development?

Browse the code, check out the SVN repository, or subscribe to the development log by RSS.



  • Adds option to use REST API in JS mode instead of admin-ajax
  • Adds fallback for themes that do not support title-tag
  • Removes calculation factor that affected a small number of users
  • Remove age validation on registration pages
  • Improves auto tabbing between fields
  • Improves CSS for smaller devices
  • Transient purging now only happens in admin and if WP Cron is disabled
  • In JavaScript mode you can now transition the Age Gate out when it is passed
  • Huge multilingual improvements with support for WPML and Polylang
  • Adds filters for custom cookie length
  • Adds option to display post settings in a metabox for Gutenberg compatibility
  • Fixes bug where logged in users were still age checked despite bypass setting
  • Other minor fixes and improvements


  • Critical fix for anyone on a standard timezone setting in WordPress


  • Age calculation now uses a timezone to hopefully help rare occasions were valid users are denied access
  • Adds minimum year input which can be filtered with age_gate_select_years
  • Other minor background changes


  • Added ‘age_gate_set_cookie’ filter, useful if you want to gain consent before setting cookies
  • Added “Anonymous Age Gate” that will only set a flag saying the Age Gate has been passed


  • Fixes an issue where Age Gate removed buttons from TinyMCE
  • Fixes an issue where Age Gate options wouldn’t show for post types created after installation
  • Deprecated: Restrict registration
  • Improves support for multilingual sites
  • Temporarily disabling Network activation
  • Minor background changes


  • Fixes issues with custom archive pages for WooCommerce and custom posts page
  • Disables Age Gate in Customiser
  • Adds notification to users if cookies are disabled


  • Fixes issue where users could not register
  • Fixes and issue where posts home would require Age Checking if the first post was restricted
  • Minor CSS update for themes not using border-box
  • Fixed missing closing form tag in admin


  • Complete rewrite
  • Age can be changed for individual content
  • Tags/Categories can now be restricted independently
  • Other archives can be independently restricted using filters
  • Age gate form can be extended with additional fields
  • Addition of various actions and filters
  • Custom CSS editor
  • Improved form validation and custom messages
  • Ability to set which users can manage Age Gate settings
  • Input fields can automatically tab to the next


  • Fixes an issue where apostrophes were being escaped incorrectly in message fields
  • Fixes an install issue with the access settings


  • Fixes an issue where Age Gate options were not showing in page/post meta box
  • Fixes issue where content was not being tested in selected content mode (pages/categories and WooCommerce taxonomies)
  • Fixes page title switching
  • Add custom page title field for when challenge is shown


  • Fixes issue in Internet Explorer where Age Gate would stick in JS mode


  • Fixes bug when trying to import new categories via Woocommerce import


  • Admin style for opacity sliders
  • Updated dev notices to only show for certain users
  • Adds notice for new dev releases


  • Adds additional CSS classes to HTML.
  • Minor CSS tweak


  • Adds event listener when JS Age Gate is passed.
  • Various minor bugfixes


  • Minor change to age_gate_before and age_gate_after
  • Added opacity settings for backgrounds


  • Adds ability to define how long Remember Me lasts


  • Fixes issue in Cache Bypass where strings were not translated
  • Fixes issue in some Multisite installs where wp-admin was becoming invalid
  • Fix for conflict with Jetpack and wp_editor function – to be remove when Jetpack fix is released


  • Adds additional test to enable restriction of WooCommerce shop page


  • Fixes issue with includes in admin area


  • CSS change for users using large logos where the them doesn’t use max-width: 100% by default
  • Corrected README typo.


  • Minor change to logo class from logo to age-gate-logo


  • Updates to translation files
  • Adds user preference to alter page title when Age Gate is displayed
  • Added additional test for Bots in “Cache Bypass” version
  • Minor text change on post editor


  • Added Facebook and Twitter crawlers to the Bot ignore list
  • Minor CSS changes
  • Added CSS classes to Age Gate plus a guide in the admin
  • Fixes issue where links in “Additional Content” could not be opened in a new window
  • Fixes issue where links in “Additional Content” could not not have their text altered
  • Fixes bug where adding a link to “Additional Content” also updated “Redirect Failures”.


  • Due to an issue when using WPeCommerce the trigger for the JS version has been altered – JS version will be selected by default
  • When using Yes/No buttons, the question “Are you over (n) years of age?” is now optional/customisable.


  • Fixes issue when using standard mode, selected restrictions and Woocommerce when the age check would not show on the product page


  • Addresses an issue in some themes where default style misbehaves on smaller screens
  • Fixes issue where plugin was causing inability to scroll in some themes
  • Added a cheeky paypal button


  • Added option to have the Remember Me option checked by default


  • In Cache Bypass mode, session storage dropped in favour of cookies to support Private/Incognito sessions.
  • Also in Cache Bypass, when the AG is successfully passed the page will refresh as some occurences of JS manipulated content were not working.


  • Fixes a bug when using Cache Bypass mode but not using Remember me


  • Caching support! Ability to use the age gate on cached sites
  • Bugfix for uninstall not working (thanks to @nate22 for the heads up)
  • Removed bad translations


  • Addresses issue on mobile devices where rendering is a little small as raised by @fwusquare2com. Option to add viewport meta added.


  • Fixes issue created in 1.3.2 where listing pages were not age gated even if “all content” was selected


  • Bugfix for missing text domain for “remember me” text
  • Updated translation files


  • Bugfix for listing pages being age gated incorrectly (e.g. blog home and archives)


  • Options added for custom error messaging
  • Slight change to admin page layout


  • Option to bypass particular content when using “All Content” setting. Useful to allow Terms pages etc.
  • Option to redirect users to a custom destination if age test is failed


  • Fixed issue where correct input was not honoured in some browsers


  • Added “no second chance” option which disallows multiple attempts if failed.
  • Minor background improvements


  • Minor changes to default style
  • Fixed typo in readme


  • Initial release