WordPress: Write post
wp_write_postCreate or update a post or page on a client's live website. Omit id to create. A new post is created as a DRAFT unless status is given; an update leaves the existing status alone unless status is given. Pass status 'publish' only when the user has explicitly asked for it to go live.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | No | Omit to create a new post | |
| site | Yes | ||
| slug | No | ||
| type | No | post | |
| title | No | ||
| status | No | Omit to keep an existing post's status, or to create a new one as a draft. | |
| confirm | No | Needed to publish, or to change a post that already exists. Leave unset to preview; set true only after the user has agreed to that exact change. | |
| content | No | HTML body | |
| excerpt | No |