wp_create_page
Create a NEW DRAFT Elementor page OR blog post (set post_type='post' for a blog post; pages use the canvas template, posts the theme template). Safe — never touches existing/live pages). For a real design pass sections — the native Elementor CONTAINER spec (see wp_update_page for the shape + widget catalog, and elementor_search/elementor_get for exact widget fields); otherwise it seeds a heading+text. Requires writes enabled. If a Global Brand Kit is set, reference @tokens in widget styles (style.color:'@primary', style.typographyToken:'h1') instead of hardcoding hex/fonts — call wp_get_brand_kit first. Returns the new post_id.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| tags | No | Comma-separated tag names or IDs. Connector v0.8.0+. | |
| title | Yes | Page/post title | |
| atomic | No | Editor V4 ATOMIC spec (JSON array) for sites where Editor V4 is active: [{type: heading|paragraph|image|button|div|flex|grid|tabs, …}]; tabs = {type:"tabs", tabs:[{label, children:[…]}], active:0}. XeoRank emits valid V4 JSON (e-tabs/e-tabs-menu/e-tab/e-tabs-content-area/e-tab-content, typed envelopes, ids). wp_widget_schema("e-tabs") and wp_section_recipes("v4-tabs") show the shape. Raw elements also accepted via elementor_data/elements. | |
| blocks | No | Gutenberg block markup (<!-- wp:heading -->…) — creates a BLOCK page instead of Elementor; plugin transport + Connector v0.3.0+ | |
| dry_run | No | Build + round-trip validate + return a preview (warnings, size) WITHOUT creating the page (no quota used) | |
| heading | No | Optional H1 heading text (used only if no sections) | |
| site_id | Yes | The WordPress site ID | |
| subtext | No | Optional intro paragraph (used only if no sections) | |
| sections | No | PREFERRED for designs: native Elementor CONTAINER spec — [{direction,width,children:[{widthPercent,widgets:[{type,...}]}]}] | |
| post_type | No | page (default) | post — use 'post' to create a blog post | |
| categories | No | Comma-separated category names or IDs, e.g. "Guides, SEO". Names that do not exist are created. Needed for a taxonomy-driven archive — a Loop Grid queries by term, so an uncategorised post never appears in one. Connector v0.8.0+. | |
| featured_image | No | Featured image for a post: an attachment ID, or an image URL to sideload into the media library. REQUIRED for a post to appear in a Loop Grid or Posts widget — those render the thumbnail, so a post without one shows blank. Connector v0.8.0+. |