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-only
Premium Addons for Elementor Page Builders premium-addons/get-page-structure

Read 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.

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.