Get Page Builder layout is a WordPress ability from Page Builder by SiteOrigin — usable via Easy MCP AI, which connects Claude, ChatGPT, and any AI assistant to your site.

Install Free Plugin →

Get Page Builder layout

Read-only

Read a post's canonical Page Builder layout data, covering both classic meta-stored layouts and block-stored Layout Blocks.

Requires the Page Builder by SiteOrigin plugin on WordPress 6.9+ for the Abilities API (both abilities are registered only when wp_register_ability() exists, guarded so the plugin never fatals on older WordPress). Both abilities additionally require the caller to hold the 'edit_post' capability for the specific post being read or written.

What it does

Given a post_id, this ability returns that post's Page Builder layout data by delegating to the same shared reader the plugin's read-only REST route uses, so the two never drift. The response's source field reports whether the data came from classic post-meta storage, Layout Block storage, both ('mixed'), or neither ('none'), and the layouts array lists one entry per layout found, each labelled with its storage ('meta' or 'block') and a block_index (null for the classic layout, or the 0-based ordinal among Layout Blocks otherwise). That block_index is the same value layout-update expects when targeting a specific block, so an AI assistant can first call layout-get to enumerate what exists on a post — including on mixed posts with both a classic layout and one or more Layout Blocks — before deciding what to change.

See it in action

You ask your AI assistant

"Show me the current Page Builder layout on post 42, including whether it's stored as a classic layout or a Layout Block."

Inputs

Name Type Required Description
post_id integer Yes Post ID of the layout to read.

Returns

An object with post_id, source (one of 'meta', 'block', 'mixed', or 'none'), and a layouts array where each entry has storage ('meta' or 'block'), block_index (an integer, or null for the classic layout), and the panels_data object for that layout.

Permission

The current user must have the 'edit_post' capability for the target post.

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.