Create a post / page
wp_create_contentCreate new content on a WordPress site, defaulting to draft to prevent accidental publication; publish only when explicitly requested.
Instructions
Create new content on a site. Defaults to draft status so nothing goes live by accident — pass status 'publish' only when the user asked for it to be published.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| date | No | ISO 8601; required when status is future. | |
| meta | No | Registered meta fields only. | |
| site | No | Configured site name. Omit to use the default site. | |
| slug | No | ||
| tags | No | ||
| title | No | ||
| author | No | ||
| parent | No | ||
| status | No | Defaults to draft on create — publish explicitly when intended. | |
| content | No | Full body as HTML or Gutenberg block markup. Replaces existing content. | |
| excerpt | No | ||
| template | No | ||
| post_type | No | Post type slug, e.g. post, page, or a custom type. | post |
| categories | No | ||
| featured_media | No | Media ID for the featured image. |