Get Post Structure is a WordPress ability from Ultimate Addons for Elementor — usable via Easy MCP AI, which connects Claude, ChatGPT, and any AI assistant to your site.

Install Free Plugin →

Get Post Structure

Read-only

Returns the full Elementor element tree of any Elementor-enabled post, including container/widget IDs, types, and setting keys.

Requires the Ultimate Addons for Elementor (Header Footer & Elementor) plugin on WordPress 6.9+ (the WP Abilities API). No ability registers unless the plugin's 'Enable AI Tools' master switch (uae_mcp_settings.enable_abilities) is turned on in settings. Most abilities require the 'manage_options' capability; a smaller set of read/discovery abilities (template and page listing, the Elementor builder read/list/schema abilities, active-template lookup, display-rule locations, and design tokens) instead require only 'edit_posts' or 'read'. Abilities that act on a specific page, post, or template additionally check the current user's per-object 'edit_post' (or 'delete_post') capability on that item. Separately, every non-readonly (Write or Destructive) ability is gated behind a site-wide 'Allow Modifications' setting at registration time: if it is off, none of those abilities are even registered with the WP Abilities API, regardless of capability checks — this covers all template/page CRUD, widget/extension toggles, display-rule updates, theme/settings changes, and the Elementor builder writes alike, not just the builder ones. Eight of those abilities (the seven Elementor page-builder writes — build, insert-widget, update-widget, remove-element, move-element, add-section, add-column — plus pages-create) additionally re-check this same setting explicitly inside execute() as a redundant safeguard.

What it does

Given a post_id and an optional full boolean (default false), the handler loads the post's parsed Elementor data. When full is false it returns a simplified tree showing only setting keys, not values, to keep the response brief; when full is true it returns the complete element tree with all setting values. It also reports the post's title, post_type, and detected layout_mode ('container' or 'section'). This is a purely inspection call — it makes no changes and does not gate on check_modifications_allowed().

See it in action

You ask your AI assistant

"Show me the full element structure of post 42, including all widget settings."

Inputs

Name Type Required Description
post_id integer Yes Any Elementor-enabled post ID (page, post, or HFE template).
full boolean No If true, return complete settings; default false returns only setting keys for brevity.

Returns

Returns post_id, post_title, post_type, layout_mode, and the elements tree (simplified or full detail depending on the full flag).

Permission

permission_callback requires current_user_can('edit_posts'); execute() also calls validate_elementor_post() (confirms the post is Elementor-editable and checks current_user_can('edit_post', ID)). No modifications-allowed gate is applied since the ability makes no writes.

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.