wp_update_template
Replace a template's whole Elementor content from a native sections spec (same shape as wp_create_page) or raw elementor_data. For small tweaks prefer wp_patch_template. Writes-gated, plugin transport, Xyle Connector v0.6.0+.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| title | No | Optional new title | |
| atomic | No | Editor V4 ATOMIC spec (JSON array): [{type: heading|paragraph|image|button|div|flex|grid|tabs, …}] → valid V4 JSON with typed envelopes. wp_widget_schema("e-tabs") / wp_section_recipes("v4-tabs") show the shape. | |
| dry_run | No | true = validate and build the content, report layout_model / node_count / warnings, write NOTHING (no quota, no snapshot). Use it first on a template: template edits change every page that renders it. | |
| site_id | Yes | The WordPress site ID | |
| elements | No | RAW top-level element JSON written VERBATIM — Editor V4 atomic (e-tabs, e-div-block, …) survives; the sections spec cannot express atomic. | |
| sections | No | JSON array — native CONTAINER spec (preferred) | |
| template_id | Yes | The template post ID | |
| page_settings | No | JSON object of page settings (e.g. popup triggers). Can be sent alone to change only a popup's triggers. | |
| elementor_data | No | Raw _elementor_data JSON (advanced) |