elementor/add-container inserts a new Elementor container at the document root or nested inside another element.
It returns the new element with its generated ID, which is what everything else you do next will need.
At a glance
| Ability | elementor/add-container |
| Toolset | Elementor — toolset/elementor |
| Group | Elementor › Elements & Widgets |
| Requires | Elementor, active on the site |
| Capability | manage_options |
| Safety | Writes data |
| Repeatable | Not idempotent — each call changes the row set, so re-running is not a no-op |
| Ships in | AcrossAI Abilities Manager 0.0.34 and later |
Containers, not sections and columns
Elementor has two layout models. The older one is sections holding columns holding widgets; the newer is containers, which are flexbox or grid and nest freely.
Containers are the current model and the one to build with. A page can contain both — Elementor renders legacy sections indefinitely — but mixing them in new work produces layouts that are harder to reason about than either model alone.
An Elementor document is a tree of elements serialised to JSON and stored in the _elementor_data post meta. Every element carries a seven-character hex ID, a type, its settings, and its children. Nothing about that structure is validated by WordPress, so a malformed write produces a document the editor refuses to open.
The generated ID is returned rather than chosen, because IDs must be unique within the document and letting a caller pick one invites collisions. Element IDs must be unique within a document. Two elements sharing an ID is a state Elementor does not expect, and the symptoms — an edit landing on the wrong element, a duplicate that disappears — are hard to trace back to the cause.
Not idempotent: each call adds another container. Retrying a call whose result you did not see leaves an empty container behind.
Input
| Name | Type | Required | What it is |
|---|---|---|---|
post_id | integer | Yes | The post holding the Elementor document. |
parent_id | string | null | No | The element to insert into. Null or omitted inserts at the document root. |
position | integer | No | Index among the parent’s children. Omitted appends at the end. |
settings | object | No | Container settings — layout, width, gap, background. |
What comes back
| Name | Type | What it is |
|---|---|---|
post_id | integer | The post written. |
element_id | string | The ID of the element created or affected. |
element | object | The element as stored. |
success | boolean | Whether the call completed. |
message | string | A one-line summary of what happened, suitable for showing a human. |
error_code | string | Present only on failure — a stable machine-readable reason, such as a missing field, a wrong field type or an unmet confirmation. |
Example
Ask your assistant:
Add a new container at the top of page 412.
It resolves to one call:
{
"ability": "elementor/add-container",
"parameters": {
"post_id": 412,
"position": 0
}
}Worth knowing
- Containers are the current layout model. Sections and columns are legacy.
- The ID is generated, not supplied.
- Not idempotent — retrying leaves an empty container.
- Clear the Elementor cache afterwards for the change to render.
Related abilities
- Add Elementor Widget — put something in it
- Merge Elementor Element Settings — style it
- Clear Elementor Cache — make it render
Get the plugins:
AcrossAI Abilities Manager · AcrossAI MCP Manager
Browse the rest: Every ability, by category