Skip to content

Page Management

Creates a new WordPress page or post with Elementor enabled (_elementor_edit_mode = builder + matching template meta).

Input:

  • title (required): page title
  • post_type: page or post, defaults to page
  • status: publish, draft, or private, defaults to draft
  • template: Elementor page template, defaults to default

Returns: { post_id, edit_url, view_url }.

Capability: publish_pages (or publish_posts for posts), with fallback to edit_pages/edit_posts for drafts.

Updates page-level Elementor settings (the ones in the page settings panel: background, padding, layout mode, custom CSS class, etc.).

Input: post_id, settings (partial settings object, merged with existing).

Returns: { success: true }.

Capability: edit_post on the target.

Removes all Elementor content from a page. The WordPress page record remains; only the _elementor_data meta is cleared. Destructive. Use deliberately.

Input: post_id.

Returns: { success: true }.

Capability: edit_post on the target.

Imports a JSON template structure into a page (replaces existing Elementor content).

Input:

  • post_id
  • template_json: array of Elementor element objects in the standard export shape

Returns: { success: true, element_count }.

Capability: edit_post on the target.

Exports a page’s full Elementor data as JSON. Useful for backup, version control, or copying between sites.

Input: post_id.

Returns: { post_id, title, data: [...] }.

Capability: edit_post on the target.

Building a page from scratch usually looks like:

create-page → get a fresh post_id
build-page (composite) → emit the full structure in one call

Or, if you’re working from a template:

list-templates → find the template ID
create-page → fresh post_id
apply-template → copy template into the new page

For editing existing pages, prefer update-element / batch-update over import-template. The latter wipes all existing content first.