wp_elementor_add_element
Adds a new Elementor subtree in one save with a private rollback. Use after_element_id: "book-demo" to insert immediately after a unique sibling, excluding any explicit parent_id or position. Alternatively use parent_id and position. Prefer wp_elementor_generate_element; do not pass element: {}.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"site_id": "<site_id>",
"post_id": "<post_id>",
"element": "<element>"
},
"name": "wp_elementor_add_element"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| element | Yes | Elementor subtree: elType is required, and widgets require widgetType. IDs can be omitted at every depth and are generated automatically. | |
| post_id | Yes | ||
| site_id | Yes | The connected site's id returned by list_sites. Call list_sites first; do not use a URL or WordPress post ID. | |
| position | No | ||
| parent_id | No | ||
| after_element_id | No |