Actions17
Custom Post Type → Delete
AI-generatedSummary
Deletes a specific record from a WordPress Custom Post Type, optionally forcing immediate removal.
Inputs
- postType (required) — The Custom Post Type to delete from. Choose from the list or specify an ID via expression.
- cptId (required) — Unique identifier for the record to delete.
- cptDeleteOptions — Options for the deletion. Include 'force' to bypass the Trash and permanently delete the record.
Output shape
a list of items containing the deleted record (usually the same data returned by the WordPress API)
By default, items are moved to the Trash. Set 'Force' to true to permanently delete them.
Examples
Example 1: Move a specific CPT item to Trash
Select Custom Post Type, provide Record ID, and leave Force unchecked.
Example 2: Permanently delete a CPT item
Select Custom Post Type, provide Record ID, and set Force to true.