Actions17
Custom Post Type → Create
AI-generatedSummary
Creates a custom post type entry on a WordPress site.
Inputs
- postType (required) — The post type identifier (slug or name) to create the custom post type record under.
- cptTitle (required) — The title of the custom post type entry.
- cptAdditionalFields — Optional collection of extra fields such as content, status, slug, etc., for the custom post type entry.
Output shape
a single created record
Returns the created item from the WordPress REST API; includes fields like ID and any returned meta. Errors are propagated unless continueOnFail is enabled.
Examples
Example 1: Create a new blog post as a custom post type.
Set Post Type to 'post', Title to 'My First CPT', and add Content 'Hello world' in Additional Fields.
Example 2: Create a CPT entry with publish status and featured media.
Choose Post Type 'product', Title 'Amazing Product', set Status to 'publish', and set Featured Media ID to 123.