Get Page Structure 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 →Get Page Structure
Read-onlyRead the Elementor element tree of a page, post or template.
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 returns the Elementor element tree for any Elementor document — a page, post or elementor_library template — as a nested structure of nodes, each carrying its id, element type (elType), widget type when applicable, and either a short settings summary or (when include_settings is true) the full per-element settings, with children nested under an 'elements' key exactly as they appear in the editor. It reads the document through Elementor's own document API where possible, falling back to the raw _elementor_data meta. It stays read-only in this context because Elementor's lazy convert-to-format write path only runs in live-editor edit mode, which a REST/MCP call never triggers. Resolve a page's title to its post_id first with premium-addons/get-id-by-title or premium-addons/list-pages.
See it in action
You ask your AI assistant
"Show me the full widget structure of the page titled 'Homepage', including all settings."
Inputs
| Name | Type | Required | Description |
|---|---|---|---|
| post_id | integer | Yes | The ID of the page, post or template whose structure to read. |
| include_settings | boolean | No | Return the full settings of every element instead of the short summary. Defaults to false — the full tree can be very large. |
Returns
An object with post_id, title, type (the Elementor document type, e.g. wp-page, section, container), and 'structure' — the nested element tree.
Permission
The current user must have the 'edit_post' capability for the target post_id. Requests for a nonexistent post ID are denied outright, both to avoid a WordPress _doing_it_wrong notice and to avoid leaking which post IDs exist.
More Premium Addons for Elementor abilities
Add Container (Elementor v3)
Add a new Elementor v3 (classic) container to a page, with layout, background, border and spacing already set.
Add Flexbox (Elementor v4 atomic)
Add a new Elementor v4 atomic flexbox container to a page, with layout, background, border and spacing already set.
Change Post Status
Change the status of a page, post or Elementor template (e.g. draft to publish).
Check Copy Compatibility
Check whether this site can render elements copied from another site via a transfer URL, before actually importing them.
Check Elementor Element
Check whether a specific element or widget type is registered on the site before trying to build with it.
Clear Premium Addons Dynamic Assets
Clear generated dynamic CSS/JS asset files and purge the related caches.