Skip to content

Your EMCP guide

Answers from our docs

YOUR CHAT, YOUR CHOICE

Before we chat

MSR Builds processes your question and up to four recent messages on our server to answer from the EMCP docs. AI is optional and needs your separate permission.

The chat is kept in this page's memory, not saved as a conversation in our database or browser storage. Our hosting and security services process connection information, such as your IP address, to prevent abuse.

Cloudflare Turnstile checks your browser and connection to prevent automated abuse when you send a question. No login is required.

Please leave out personal, sensitive or confidential information, passwords and API keys.

You can withdraw consent and clear this page's chat at any time. This cannot undo a request already sent or erase provider/security records.

Chat privacy, retention & your rights ↗ · Privacy contact

Starting chat consents to this processing. You can browse our docs without using the chat.

Custom Post Type UI

New in 3.21.1 (free), and in EMCP Lite 1.0.5 on WordPress.org. Two dispatcher tools work with Custom Post Type UI 1.19.3:

ToolDefaultPurpose
cptui-readOnCPT UI post types and taxonomies, and every public post type (6 operations)
cptui-writeOffCreate post types and taxonomies, update labels and descriptions (4 operations)

Enable the write tool under Tools > Plugins > Custom Post Type UI. Call a tool with no operation to get its operations and argument schemas.

  • Custom Post Type UI 1.19.3 exactly; another version answers unsupported_version.
  • An administrator (manage_options) who also has CPT UI’s required capability (manage_options unless a filter changes it).
OperationWhat it does
statusCPT UI version and the qualified version
list-post-typesPost types stored by CPT UI, paged (page, per_page up to 100)
list-taxonomiesTaxonomies stored by CPT UI, paged
list-registered-post-typesEvery public post type, with cptui_owned true or false
get-post-typeOne CPT UI post type by slug, with the version
get-taxonomyOne CPT UI taxonomy by slug, with the version

The version is a hash of every CPT UI post type and taxonomy together.

Every write needs confirm: true; dry_run: true validates first. Updates need the current version.

OperationWhat it does
create-post-typeslug, label, singular_label, optional description, public, show_in_rest, hierarchical and supports
create-taxonomyslug, label, singular_label, object_types (1 to 20 public post types), optional description, public, show_in_rest, hierarchical
update-post-typeChange label, singular_label or description
update-taxonomyChange label, singular_label or description

supports takes up to eight of title, editor, thumbnail, excerpt, revisions, author, comments and page-attributes. Set show_in_rest: true and include editor for the block editor. After each write the type is registered again and rewrite rules are refreshed.

  • Slugs are 2 to 20 characters, start with a lowercase letter and use a-z, 0-9 and _. They never change after creation.
  • Reserved slugs from CPT UI’s own lists, the prefixes wp_, emcp_, elementor, acf_ and _, and any slug already registered are refused (protected_slug, already_exists).
  • Labels and descriptions must be plain text (invalid_text).
  • No custom capability types, meta box callbacks, REST controllers, custom supports or default terms. A definition that carries them, or settings another extension stored, is refused (unsupported_definition), because CPT UI’s own save would discard them.
  • When a filter replaces CPT UI’s stored definitions, writes and undo answer filtered_storage; use the editor of the plugin that owns them.
  • Linked post types or taxonomies must exist and be public (linked_unavailable).
  • There is no delete operation.

Label and description updates can be undone from History. Undoing a creation removes the definition only when no posts of that type exist in any status, trash included, no terms exist in that taxonomy and no other definition refers to it. Otherwise it answers definition_in_use, even with force. If CPT UI fails after saving, EMCP restores the earlier definition or records a recovery entry.