Omea Consent · Guides

Age verification popup for WordPress (age gate)

Add an age gate to WordPress with Omea Consent Pro: yes/no or date-of-birth check, minimum age, redirect for under-age visitors – rendered on the server.

Updated · Omea Consent 1.0.2

On this page
  1. Add an age gate
  2. Settings and defaults
  3. How it works
  4. Only on some pages

Sites that sell or promote alcohol, tobacco, vaping or gambling often need to ask visitors their age before they enter. Omea Consent Pro includes an age gate that matches your cookie banner and can’t be skipped by blocking scripts.

Add an age gate

  1. Open Age Gate Go to Omea Consent › Age Gate and switch on the Age gate card.
  2. Set the minimum age Enter the Minimum age – 18 by default.
  3. Choose how visitors verify Under Verification pick Simple confirmation (yes / no) or Date of birth.
  4. Decide how long to remember Set Remember for in days – 30 by default; 0 asks on every visit.
  5. Write the texts Edit the Heading, Message and Buttons. Use {age} to insert the minimum age.
  6. Handle under-age visitors Under If the visitor is too young, enter a Redirect to address, or leave it empty to show a message instead. Click Save changes.

A live preview on the right shows the gate as you edit.

Settings and defaults

Setting Default
Minimum age 18 (1–99)
Verification Simple confirmation (yes / no)
Remember for 30 days (0–365; 0 asks every visit)
Heading Please verify your age
Message You must be {age} or older to enter this site.
Buttons I am {age} or older / Leave
Redirect to https://www.google.com
Too-young message Sorry, you are not old enough to view this site.

Tick Show site name above the heading to add your site’s name to the gate.

How it works

  • The overlay is rendered on the server, so it’s there even if a visitor blocks JavaScript.
  • With Date of birth, the visitor’s age is calculated from the date they enter.
  • A passed check is remembered in the omea_age_gate_ok cookie for the period you set. If you raise the minimum age, visitors are asked again.
  • The gate uses your cookie banner’s theme and colours from Settings › Appearance: a dark or light box, a filled confirm button and an outlined leave button.

Only on some pages

Developers can decide per request whether the gate shows with the omea_age_gate_should_show filter – for example only on product pages.

An age gate asks visitors to confirm their age; it doesn’t verify identity. Check what your market and products legally require.