wp_set_template_conditions
Set DISPLAY CONDITIONS on an Elementor Theme Builder template and optionally publish it. Conditions use Elementor's include/exclude grammar: include/general (entire site), include/singular/front_page, include/singular/page (all pages), include/singular/page/123 (specific), include/singular/post, include/archive, include/archive/category, exclude/singular/page/12, … This changes what renders SITE-WIDE — review the template first. Requires writes enabled + Xyle Connector v0.3.0+.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| publish | No | Publish the template after saving conditions | |
| site_id | Yes | The WordPress site ID | |
| conditions | Yes | JSON array of condition strings, e.g. ["include/general", "exclude/singular/page/12"] | |
| template_id | Yes | The template's post ID (from wp_create_template / wp_list_templates) |