Age Gate is a WordPress ability from The Plus Addons for Elementor — usable via Easy MCP AI, which connects Claude, ChatGPT, and any AI assistant to your site.
Install Free Plugin →Age Gate
WriteAdds the The Plus "Age Gate" widget (tp-age-gate) to an Elementor container.
Requires the The Plus Addons for Elementor plugin (which registers under the 'tpae' ability category) on WordPress 6.9+, with Elementor active. Every ability requires the current user to have the 'edit_posts' capability (and 'edit_post' for the specific post being modified); abilities that create or edit content also verify Elementor and, where relevant, the target The Plus widget are available. A subset of abilities (theme templates, template conditions, dynamic tags, popups, and some custom-code abilities) only register when Elementor Pro is active, and many widget abilities load only in the free plugin when the Pro add-on is inactive.
What it does
The execute_callback tpae_mcp_add_theplus_age_gate_ability() reads the target post's Elementor page data, builds a widget element of type tp-age-gate from the mapped input settings (verification method, title/description text, button text/icons, cookie behavior, colors, spacing, and many style controls), inserts it into the specified parent container at the requested position, and saves the updated Elementor data back to the post. It requires Elementor to be active and the tp-age-gate widget to be registered on the site, and requires non-empty post_id and parent_id, with the target post existing.
See it in action
You ask your AI assistant
"Add an Age Gate widget to container abc123 on page 42 using verification method 'method-1' with title 'Are you 18+?' and a minimum age of 18."
Inputs
| Name | Type | Required | Description |
|---|---|---|---|
| post_id | integer | Yes | Elementor page/post ID |
| parent_id | string | Yes | Target Elementor container ID |
| position | integer | No | Insert position. Use -1 to append. |
| age_verify_method | string | No | Method (enum: columns, method-1, method-2, method-3) |
| backend_preview | string | No | Backend Visibility (enum: yes, no) |
| age_gate_align | object | No | Alignment |
| age_icon_popover_toggle | string | No | Logo (enum: yes, no) |
| age_icon_img_type | string | No | Logo (enum: yes, no) |
| age_head_img | integer | No | Icon library (Image ID) |
| age_title_popover_toggle | string | No | Title (enum: yes, no) |
| age_gate_title | string | No | Title (enum: yes, no) |
| age_gate_title_input | string | No | Label |
| age_gate_description | string | No | Text Description (enum: yes, no) |
| age_gate_description_input | string | No | Type |
| age_gate_description_inputwo | string | No | Type |
| age_gate_description_inputhree | string | No | Type |
| chkinput_text | string | No | Confirm Box |
| age_extra_info_switch | string | No | Extra Content (enum: yes, no) |
| age_gate_align_txtera | string | No | Alignment |
| age_extra_info | string | No | Type |
| button_text | string | No | Text |
| icon_action | string | No | Icon (enum: yes, no) |
| icon_position | string | No | Icon Position |
| button_icon | string | No | Icon library |
| second_button_text | string | No | Text |
| second_icon_action | string | No | Icon (enum: yes, no) |
| second_icon_position | string | No | Icon Position |
| second_button_icon | string | No | Icon |
| birthyears | string | No | Minimum Age Limit |
| age_cookies | string | No | Cookies (enum: yes, no) |
| age_cookies_days | string | No | Cookies Expiry Time |
| db_max_width | object | No | Form Content Max-width (Slider/Size Object) |
| age_sec_bg_image_switch | string | No | Background Image (enum: yes, no) |
| age_sec_bg_image | integer | No | Background (Image ID) |
| age_bgImg_pos | string | No | Background Position |
| age_sec_bg_overlay_color | string | No | Overlay Color (Color Hex/RGBA) |
| age_side_image_show | string | No | Right Side Image (enum: yes, no) |
| age_side_img | integer | No | Image (Image ID) |
| age_rightImg_pos | string | No | Right Image Position |
| age_gate_wrong_message | string | No | Error Message |
| logo_margin | object | No | Margin (Dimensions Object) |
| logo_size | object | No | Logo Size (Slider/Size Object) |
| logo_border_radius | object | No | Border Radius (Dimensions Object) |
| title_padding | object | No | Padding (Dimensions Object) |
| title_margin | object | No | Margin (Dimensions Object) |
| titleNmlColor | string | No | Color (Color Hex/RGBA) |
| titleHvrColor | string | No | Color (Color Hex/RGBA) |
| desc_padding | object | No | Padding (Dimensions Object) |
| desc_margin | object | No | Margin (Dimensions Object) |
| descNmlColor | string | No | Color (Color Hex/RGBA) |
| descNmlBRadius | object | No | Border Radius (Dimensions Object) |
| descHvrColor | string | No | Color (Color Hex/RGBA) |
| descHvrBRadius | object | No | Border Radius (Dimensions Object) |
| chktxt_padding | object | No | Padding (Dimensions Object) |
| chktxt_margin | object | No | Margin (Dimensions Object) |
| chktxtNmlColor | string | No | Color (Color Hex/RGBA) |
| chktxtHvrColor | string | No | Color (Color Hex/RGBA) |
| inputdate_margin | object | No | Margin (Dimensions Object) |
| inputdate_padding | object | No | Padding (Dimensions Object) |
| inputdate_color | string | No | Text Color (Color Hex/RGBA) |
| inputdate_bradius | object | No | Border Radius (Dimensions Object) |
| inputdate_color_h | string | No | Text Color (Color Hex/RGBA) |
| inputdate_bradius_h | object | No | Border Radius (Dimensions Object) |
| fbtn_padding | object | No | Padding (Dimensions Object) |
| fbtn_margin | object | No | Margin (Dimensions Object) |
| fbtn_color | string | No | Text Color (Color Hex/RGBA) |
| fbtn_bradius | object | No | Border Radius (Dimensions Object) |
| fbtn_color_h | string | No | Text Color (Color Hex/RGBA) |
| fbtn_bradius_h | object | No | Border Radius (Dimensions Object) |
| tgl_margin | object | No | Margin (Dimensions Object) |
| tgl_icn_size | object | No | Icon Size (Slider/Size Object) |
| tgl_icn_space | object | No | Offset (Slider/Size Object) |
| tgl_icn_space_left | object | No | Offset (Slider/Size Object) |
| tglNormalColor | string | No | Icon Color (Color Hex/RGBA) |
| tglHoverColor | string | No | Icon Color (Color Hex/RGBA) |
| sbtn_padding | object | No | Padding (Dimensions Object) |
| sbtn_margin | object | No | Margin (Dimensions Object) |
| sbtn_color | string | No | Text Color (Color Hex/RGBA) |
| sbtn_bradius | object | No | Border Radius (Dimensions Object) |
| sbtn_color_h | string | No | Text Color (Color Hex/RGBA) |
| sbtn_bradius_h | object | No | Border Radius (Dimensions Object) |
| scndBtn_icn_size | object | No | Icon Size (Slider/Size Object) |
| scndBtn_icn_space | object | No | Offset (Slider/Size Object) |
| scndBtn_icn_space_left | object | No | Offset (Slider/Size Object) |
| scndBtn_margin | object | No | Margin (Dimensions Object) |
| scndBtnNormalColor | string | No | Icon Color (Color Hex/RGBA) |
| scndBtnHoverColor | string | No | Icon Color (Color Hex/RGBA) |
| info_padding | object | No | Padding (Dimensions Object) |
| info_margin | object | No | Margin (Dimensions Object) |
| einfo_Size | object | No | Text Size (Slider/Size Object) |
| einfoNmlColor | string | No | Color (Color Hex/RGBA) |
| einfoHvrColor | string | No | Color (Color Hex/RGBA) |
| msg_padding | object | No | Padding (Dimensions Object) |
| msg_margin | object | No | Margin (Dimensions Object) |
| msgNmlColor | string | No | Color (Color Hex/RGBA) |
| msgNmlBRadius | object | No | Border Radius (Dimensions Object) |
| msgHvrColor | string | No | Color (Color Hex/RGBA) |
| msgHvrBRadius | object | No | Border Radius (Dimensions Object) |
| box_position | string | No | Box Position (enum: yes, no) |
| box_left_auto | object | No | Left (Auto) |
| box_pos_xposition | object | No | Left (Slider/Size Object) |
| box_right_auto | object | No | Right (Auto) |
| box_pos_rightposition | object | No | Right (Slider/Size Object) |
| box_width | object | No | Box Width (Slider/Size Object) |
| box_height | object | No | Box Height (Slider/Size Object) |
| box_bradiusNml | object | No | Border Radius (Dimensions Object) |
| box_bradiusHvr | object | No | Border Radius (Dimensions Object) |
| settings | object | No | Raw Elementor control key/value pairs to merge. Supports Cookie-based persistence orchestration, Lottie animation triggers, and responsive interactive geometry. |
Returns
Returns element_id (string), widget_type (string), and post_id (integer) of the created widget.
Permission
Requires the current user to have the edit_posts capability, and if a post_id is provided, also requires edit_post capability on that specific post.
More The Plus Addons for Elementor abilities
Accordion
Adds The Plus Addons "Accordion" widget (tp-accordion) to an Elementor container.
Add Code Snippet
Creates a site-wide Custom Code snippet using Elementor Pro, injecting CSS/JS/meta into the head or body on all pages.
Add Container
Adds a new Elementor flex container to a page or nests it inside another existing container.
Add Container
Adds a flex or grid container to a page, optionally nested inside a parent container.
Add Custom CSS
Adds custom CSS to a specific element or to the entire page (requires Elementor Pro).
Add Custom JavaScript
Adds a custom JavaScript snippet to a page by inserting an HTML widget containing a <script> tag; works with free Elementor.