Delete a post or page
wp_delete_postDelete a post, page or entry of any post type: into the trash by default, for good with force=true. Trashing also hides its comments; a trashed entry comes back when wp_update_post gives it a status. An entry already in the trash, a media file, and any entry on a site without a trash are refused without force=true, so a repeated call does not delete for good by itself. Deleting for good also removes its revisions, comments, custom fields and term assignments and cannot be undone. Needs the right to delete the entry. Returns {deleted: true, permanent, id}; an unknown id returns a not-found error. Media files are deleted with wp_delete_media. Forwarded by AlphaBridge Connect to the one site this connection reaches.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | Id of the post, page or entry to delete. | |
| force | No | true deletes for good instead of trashing. Default false. |