Add Container (Elementor v3) is a WordPress ability from Premium Addons for Elementor — usable via Easy MCP AI, which connects Claude, ChatGPT, and any AI assistant to your site.

Install Free Plugin →

Add Container (Elementor v3)

Write

Add a new Elementor v3 (classic) container to a page, with layout, background, border and spacing already set.

Requires the Premium Addons for Elementor plugin on WordPress 7.0+ for the Abilities API (abilities are registered only when the wp_register_ability() function exists). Dashboard, settings and site-inventory abilities (get-id-by-title, list-pages, list-templates, get-global-settings, get-settings, update-setting, scan-usage, disable-unused-widgets, clear-dynamic-assets, subscribe-newsletter) require the caller hold the 'manage_options' capability. premium-addons/create-page requires 'edit_pages'. premium-addons/get-widget-schema, premium-addons/get-addon-schema, premium-addons/list-available-elements, premium-addons/list-pa-addons, premium-addons/detect-atomic-support, premium-addons/check-elementor-element and premium-addons/create-elementor-template require 'edit_posts'. premium-addons/get-page-structure, premium-addons/get-element-settings, premium-addons/add-flexbox, premium-addons/add-container, premium-addons/update-element-settings, premium-addons/insert-widget, premium-addons/remove-element, premium-addons/change-post-status and premium-addons/duplicate-post require 'edit_post' on the target post_id, and deny requests for a nonexistent post_id outright.

What it does

This ability inserts a new classic Elementor container element into a page, post or template, either at the document root or nested inside an existing container at a given position. It checks that the container element type is actually registered first — the container element can be inactive on sites installed before Elementor 3.16 with the Flexbox Container feature off — and errors clearly instead of silently persisting a broken element. Typed inputs cover html_tag, width (sets content_width to full plus the width control), min_height, background (classic color or linear/radial gradient), border (style, width per side, color, radius), margin and padding — mapped straight onto container's own native control keys (background_background, border_border, and so on). A settings passthrough object is also accepted for any other native container control key, applied verbatim and overriding the typed inputs, letting an AI assistant reach responsive variants (_tablet/_mobile suffixes) or any conditional control the typed inputs don't cover. This is the fallback container ability for sites where premium-addons/add-flexbox's v4 atomic elements aren't supported.

See it in action

You ask your AI assistant

"Add a full-width container to the homepage with a dark background and 40px padding on all sides."

Inputs

Name Type Required Description
post_id integer Yes The ID of the Elementor page, post or template to add the container to.
parent_id string No The id of an existing container to nest the new container inside. Omit to insert at the document root.
position integer No Zero-based index among the parent's children. Omit to append at the end.
html_tag string No The HTML tag the container renders as: div, header, footer, main, article, section, aside or nav. Defaults to div.
width object No Container width. Sets content_width=full plus the width control. { size, unit? (px|%|vw, default %) }.
min_height object No Minimum height of the container (the container has no fixed-height control). { size, unit? (px|vh, default px) }.
background object No Container background. { color? for a classic background, gradient? { color, color_b, angle (default 180), type: linear|radial } — gradient wins when both are set }.
border object No Container border { style? (solid|double|dotted|dashed|groove), width? { top?, right?, bottom?, left?, unit? }, color?, radius? { top?, right?, bottom?, left?, unit? } — setting width or color applies style (default solid) as the prerequisite toggle; radius is not gated on it }.
margin object No Margin { top?, right?, bottom?, left?, unit? } in px by default.
padding object No Padding { top?, right?, bottom?, left?, unit? } in px by default.
settings object No Passthrough for any other native container control key, applied verbatim and overriding the typed inputs. Responsive variants use the _tablet/_mobile suffixes. Conditional controls need their toggles (e.g. flex_* need container_type=flex, box_shadow_box_shadow needs box_shadow_box_shadow_type=yes).

Returns

An object with element_id (the id of the new container element) and post_id (the document it was added to).

Permission

The current user must have the 'edit_post' capability for the target post_id, checked via Helpers::can_edit_input_post(); requests for a nonexistent post_id are denied outright.

Newsletter

The AI + WordPress space moves fast. Keep up.

New tools, workflow ideas, and product updates — be the first to know what's next.

No spam, unsubscribe anytime.