wp_activate_template
ONE call to make a template the LIVE header/footer: publishes it, sets its display condition (default include/general = whole site), and demotes the previously-active same-type template. Replaces the create→set-conditions→exclude-old dance. Changes what renders SITE-WIDE — screenshot-review first. Writes-gated, Xyle Connector v0.6.0+.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| site_id | Yes | The WordPress site ID | |
| condition | No | Display condition (default include/general) | |
| template_id | Yes | The template post ID to make live | |
| demote_others | No | Demote prior active same-type templates (default true) |