Custom post types
Register custom post types and edit options and labels.
Post type options:
- Post type label: Name of the post type shown in the menu. Usually plural.
- Post type key: Key name of the custom post type. Will be sanitized, must not exceed 20 characters. Leave blank to generate from post type label.
- Description: Short descriptive summary about this post type.
- Post type supports: Core feature(s) the post type supports.
Post type parameters:
- Hierarchical: Whether the post type is hierarchical. Enable to create pages. Disable to create posts.
- Public: Whether a post type is intended for use publicly either via the admin interface or by front-end users.
- Publicly queryable: Whether queries can be performed on the front end for the post type as part of parse_request().
- Show UI: Whether to generate and allow a UI for managing this post type in the admin.
- Show in REST: Whether to include the post type in the REST API. Enable for the post type to be available in the block editor.
- Show in navigation menus: Makes this post type available for selection in navigation menus.
- Has archive: Whether there should be post type archives.
- Can export: Whether to allow this post type to be exported.
- Exclude from search: Whether to exclude posts with this post type from front end search results.
Post type rewrite:
- Rewrite: slug: Customize the permastruct slug. Leave blank to default to post type key.
- Rewrite: feeds: Whether the feed permastruct should be built for this post type.
- Rewrite: with front: Whether the permastruct should be prepended with WP_Rewrite::$front.
- Post type capability: The string to use to build the read, edit, and delete capabilities Leave blank for default post / page.
Post type menu:
- Menu icon: The icon for the post type in admin menu.
- Menu name: Label for the menu name. Default is same as post type name (plural).
- Menu position: The position in the menu order the post type should appear. Set to 0 for default position.
Post type labels:
- Post type name (plural): General name for the post type, usually plural. Default is same as post type label.
- Post type name (singular): Name for one object of this post type. Default is "Post" / "Page".
- Add new: Label for adding a new item. Default is "Add Post" / "Add Page".
- Add new item: Label for adding a new singular item. Default is "Add Post" / "Add Page".
- New item: Label for the new item page title. Default is "New Post" / "New Page".
- Edit item: Label for editing a singular item. Default is "Edit Post" / "Edit Page".
- View item: Label for viewing a singular item. Default is "View Post" / "View Page".
- View items: Label for viewing post type archives. Default is "View Posts" / "View Pages".
- All items: Label to signify all items in a submenu link. Default is "All Posts" / "All Pages".
- Archives: Label for archives in nav menus. Default is "Post Archives" / "Page Archives".
- Search items: Label for searching plural items. Default is "Search Posts" / "Search Pages".
- Not found: Label used when no items are found. Default is "No posts found" / "No pages found".
- Not found in Trash: Label used when no items are in the Trash. Default is "No posts found in Trash" / "No pages found in Trash".
- Parent item: Label used to prefix parents of hierarchical items. Not used on non-hierarchical post types. Default is "Parent Page".
On update:
Basic mode: New code will be generated to update the related PHP file. Related theme mod will be updated.
Advanced mode: Editor code will be used to update the related PHP file. Related theme mod will not be updated.
On reset:
No custom post types will be registered.
Related PHP file will reset to default template. Related theme mod will reset to default values.
Registered post types
All registered post types (core WP and custom) are listed in sidebar panel.