Home / Documentation / Version 2 / Shortcodes / Age Gate
Age Gate
You are reading the documentation for Age Gate 2.x. Switch to the documentation for 3.x.
From 2.9.0 Age Gate is available as a shortcode on top of the standard overlay. The shortcode can have its own age declared for the content it wraps, choose the input type per usage and its title.
Example
[age-gate age="21" title="Restricted content" type="buttons"]
<!-- your restricted content -->
[/age-gate]
Attributes
Attribute | Values |
---|---|
age | A numeric value for the users age. Defaults to the min age setting in restrictions |
title | A copy line to show when restricted. Defaults to the subheading message. For no title, pass title="" |
type | They input type to display. Allowed options are inputs, buttons or selects. Defaults to the main settings option |
Note: The shortcode version does not trigger hooks like the main version at this time and cannot be extended.