| 1 |
# Age Gate Guide |
| 2 |
|
| 3 |
## Overview |
| 4 |
Age Gate blocks access with a full-screen overlay until visitors confirm they meet the minimum age. The feature stores the decision in a cookie to avoid repeat prompts. |
| 5 |
|
| 6 |
## Free Capabilities |
| 7 |
- Toggle Age Gate under `King Addons → Age Gate`. |
| 8 |
- Modes: simple Yes/No or minimum age notice (text-only). |
| 9 |
- Display scope: entire site, posts, or pages with exclusions. |
| 10 |
- Design presets: centered, bottom, top, side panel (left/right), or fullscreen modal; overlay color/opacity, card colors, typography, and button labels. |
| 11 |
- Deny handling: redirect to a chosen page or show a blocked message. |
| 12 |
|
| 13 |
## Pro Capabilities |
| 14 |
- Date of birth validation with server-side age calculation. |
| 15 |
- Geo rules: country-based minimum ages using WooCommerce geolocation when available. |
| 16 |
- Display rules: custom post types, archives, and WooCommerce targets (product, category, shop) with optional category filtering. |
| 17 |
- Elementor template as the card body, entrance animations, hover styles, logo/background. |
| 18 |
- Behaviour controls: repeat prompt cadence (session/days/once), consent checkbox, reset on rule change. |
| 19 |
|
| 20 |
## Setup (Free) |
| 21 |
1. Go to `King Addons → Age Gate` and enable the switch. |
| 22 |
2. Choose verification mode and minimum age. |
| 23 |
3. Pick display scope and optional exclusion pages. |
| 24 |
4. Adjust design colors/template and button labels. |
| 25 |
5. Select denial behaviour (redirect or block message) and save. |
| 26 |
|
| 27 |
## Setup (Pro) |
| 28 |
1. Select **Date of birth** mode and pick the date format. |
| 29 |
2. Configure geo rules (`Default age` and country map like `US=21`). |
| 30 |
3. Set display mode to **Custom** and target CPTs or WooCommerce contexts. |
| 31 |
4. Choose Elementor template/animation/brand assets and hover states. |
| 32 |
5. Configure repeat prompt mode, consent checkbox, and save. |
| 33 |
|
| 34 |
## Frontend Behaviour |
| 35 |
- On first view (no cookie) the overlay shows and locks scroll. |
| 36 |
- Accept sets `allowed|{revision}` cookie; decline sets `denied|{revision}`. |
| 37 |
- Redirect executes server-side when denial is set to redirect; block keeps the overlay visible with the blocked message. |
| 38 |
- Revision changes (when “reset on rule change” is enabled) invalidate old cookies. |
| 39 |
|
| 40 |
## Testing Checklist |
| 41 |
- Confirm overlay shows when enabled and no cookie exists. |
| 42 |
- Accept writes cookie and hides overlay; decline redirects or blocks based on settings. |
| 43 |
- Exclusion pages bypass the overlay. |
| 44 |
- Pro: DOB validation rejects invalid/underage inputs and accepts valid ones; geo overrides apply expected minimum age. |
| 45 |
- Pro: Custom display rules trigger only on targeted CPT/Woo contexts; consent checkbox blocks submission until checked. |
| 46 |
- Responsive: overlay and card remain usable on mobile widths. |
| 47 |
|
| 48 |
## Frontend preview |
| 49 |
|
| 50 |
To force-render the Age Gate for visual testing (even if you already accepted it), open any frontend URL as an admin with: |
| 51 |
|
| 52 |
`?ka_age_gate_preview=1` |
| 53 |
|
| 54 |
|
| 55 |
|
| 56 |
|