30 days free. No credit card. Full access from the moment you connect your site.

Start free trial

Add Elementor Container

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

Abilityelementor/add-container
ToolsetElementor — toolset/elementor
GroupElementor › Elements & Widgets
RequiresElementor, active on the site
Capabilitymanage_options
SafetyWrites data
RepeatableNot idempotent — each call changes the row set, so re-running is not a no-op
Ships inAcrossAI 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

NameTypeRequiredWhat it is
post_idintegerYesThe post holding the Elementor document.
parent_idstring | nullNoThe element to insert into. Null or omitted inserts at the document root.
positionintegerNoIndex among the parent’s children. Omitted appends at the end.
settingsobjectNoContainer settings — layout, width, gap, background.

What comes back

NameTypeWhat it is
post_idintegerThe post written.
element_idstringThe ID of the element created or affected.
elementobjectThe element as stored.
successbooleanWhether the call completed.
messagestringA one-line summary of what happened, suitable for showing a human.
error_codestringPresent 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


Get the plugins:
AcrossAI Abilities Manager · AcrossAI MCP Manager

Browse the rest: Every ability, by category


Keep reading