
The Age Restriction module shows a fullscreen overlay that asks visitors to confirm their age before they can browse your site. It is designed for stores that sell age-restricted products, such as alcohol, tobacco or other adult goods. Once a visitor confirms, their choice is remembered on their device, so they are not asked again on every page.
The overlay is cache-friendly: it works correctly even with full-page caching or a CDN, because the “already confirmed” check runs in the visitor’s browser.
Enabling Age Restriction
- Go to Theme Settings (Rey theme > Settings).
- Open the General panel and scroll to the Site Elements group.
- Click Age Restriction.
- Turn on Enable Age Restriction.
Testing tip: the overlay is intentionally hidden while you are editing, that is, in the Elementor editor, the Settings editor and the live preview. To see it in action, open your site in a private (incognito) browser window.
Minimum age
Use the Minimum age slider to set the age visitors must confirm, anywhere from 13 to 30. The default is 18.
This value also powers the {{age}} tag (see below), so you only set the number in one place and every text updates automatically.
Content
This section controls everything shown inside the overlay.
- Show site logo – displays your site logo above the question. When no logo is set, your site name is shown instead. On by default.
- Title – the main question, for example “Are you 18 or older?”.
- Description – a short paragraph under the title explaining the restriction.
- Confirm button text – the label of the “yes” button.
- Decline button text – the label of the “no” button.
The {{age}} tag
In the Title and Description you can type {{age}} and it is automatically replaced with the minimum age you set. For example, Are you {{age}} or older? becomes Are you 18 or older?. This way, if you ever change the minimum age, all your texts stay in sync.
Under-age visitors
This section decides what happens when a visitor taps the decline button.
- Action – choose one of:
- Show a message (the default) – the overlay swaps to a short message and offers a “Go back” button, in case they tapped by mistake.
- Redirect to a URL – the visitor is sent away from your site.
- Message – the text shown when Action is set to Show a message.
- Redirect URL – where under-age visitors are sent when Action is set to Redirect to a URL. Leave it empty to send them to google.com.
Behavior
- Remember confirmation for – how long a visitor’s confirmation is kept on their device before they are asked again. Choose One day, One week, One month (the default) or One year.
- Skip for logged-in users – when on, logged-in users, including administrators, never see the overlay. Off by default.
Style
Fine-tune how the overlay looks. Each color option is optional, and leaving it empty keeps the theme default.
- Backdrop blur – how strongly the page behind the overlay is blurred, from 0 (no blur) to 40. The default is 12.
- Backdrop tint – a color overlay laid over the blurred page.
- Box background color – the background of the dialog box.
- Text color – the color of the title and description.
- Accent color – used for the small line under the logo. The Confirm and Decline buttons follow your site’s global button colors, not this setting.
Good to know
- The confirmation is stored in the visitor’s browser (not in a cookie sent on every request), so the overlay is fully compatible with caching plugins and CDNs.
- Because the choice is remembered per device, a visitor who clears their browser storage, or opens the site on another device, will be asked again.
- The overlay locks page scrolling and blurs the content behind it from the very first paint, so restricted content is never briefly visible before the overlay appears.