Age-Restricted Content: Per-Page Control, Shortcode, Gutenberg Block & Elementor Widget
You do not have to lock the whole site. Hide only part of a page until the visitor has verified their age, or decide per page whether the gate shows at all.
Per-page control
Every page, post and product has an Age verification box in the editor sidebar with three choices:
| Option | Result |
|---|---|
| Default | Follows your site-wide settings. |
| Strict | Hides the content on the server until the visitor has passed the check (works when Strict content gating is set to “Only pages I mark” or “Every page”). |
| Never show the age gate | No popup on this page — useful for your privacy policy, terms, contact or landing pages. |
Gutenberg block
- In the block editor click + and search for Age-restricted content.
- Put any blocks you like inside it (text, images, videos, buttons…).
- Optionally change the message and button text in the block settings.
Visitors who have not verified see the message and a Verify my age button instead of the content; after verifying, the content appears.
Elementor widget
- In Elementor search the widget panel for Age-restricted content.
- Drag it onto the page and add your content in the Content for verified visitors editor.
- Under Before verification set the message and button label.
Note: In the Elementor editor the widget shows a dashed box so you can always edit the hidden content.
Shortcode
[age_restricted message="Please verify your age to watch this video." button="Verify now"]
Your age-restricted content here
[/age_restricted]
Both attributes are optional. The shortcode works in classic posts, widgets and most page builders.
Open the age gate from any button
Add the CSS class avp-trigger-manual to any link, menu item or Elementor button to open the age gate when it is clicked.
Tip: With Strict server-side verification on (Security tab), restricted content only unlocks with the signed cookie, so it cannot be faked in the browser.
Read next
Was this guide helpful?