For the complete documentation index, see llms.txt. This page is also available as Markdown.

delete_acpt_post_type

Delete a custom post type

Delete a custom post type.

Usage

delete_acpt_post_type('new-cpt', true);

Parameters

Parameter
Type
Required
Description

post_name

string

Required

The post type slug

delete_posts

boolean

Optional

Accepted for future use, but currently has no effect — this call never deletes the type's posts, regardless of the value passed. Cascade-deleting posts is instead governed by a separate, global plugin setting

Return

Type
Description

bool

true on success, false on failure

Last updated