2026年11月13日

2026年11月13日

Custom Post Type UI: Create Custom Post Types Step by Step

This article is a localized edition of the Japanese original. Read the Japanese original

Custom Post Type UI (CPT UI below) is a plugin that lets you create new kinds of content (custom post types), separate from Posts and Pages, from the admin screen without writing code. It suits content you want to manage apart from regular posts, such as product pages, case studies, announcements or a list of books.

The steps and screen labels in this article were checked with CPT UI 1.19.3 and WordPress 7.1.3 as of November 2026.

What CPT UI can and cannot do

Can do Cannot do
Register custom post types (set the register_post_type() arguments on screen) Create input fields (custom fields)
Register custom taxonomies (your own classifications) Design the archive or single pages
Export the registered settings as PHP code Provide a dedicated tool to bulk-change the type of existing posts

If you need input fields such as "price" or "release date", combine it with a field plugin such as Advanced Custom Fields (ACF).

Step 1: Install and activate the plugin

  1. In the admin, open Plugins → Add New Plugin.
  2. Type Custom Post Type UI into the search box.
  3. For "Custom Post Type UI" by WebDevStudios, click Install Now, then click Activate.

Once activated, a CPT UI item appears in the left menu. If WP-CLI is available, this command does the same thing:

wp plugin install custom-post-type-ui --activate

Step 2: Enter the basic settings of the post type

Open CPT UI → Add/Edit Post Types and, on the Add New Post Type tab, fill in these three fields under Basic settings (* means required).

Field Example Description
Post Type Slug book The internal name, also used in URLs. Lowercase letters, numbers, dashes and underscores only, up to 20 characters
Plural Label Books The name shown in the admin menu
Singular Label Book The name used when referring to a single item

In Japanese, the plural and singular labels can be the same word.

After entering them, click Populate additional labels to fill the Additional labels section (texts shown around the admin such as "Add New Item" and "Edit Item") based on your labels. Edit them as needed.

Choose the slug with the intention of never changing it. As the warning on the CPT UI screen says, editing the slug does not rename the existing post type; it registers a separate post type instead. (When you change it, checking Migrate posts to newly renamed post type? moves the posts to the new slug.) Also avoid names WordPress already uses, such as post or page.

Step 3: Review the main settings

The Settings section on the same screen has many fields, but these are the ones to check first. Everything else works with the defaults.

Field Default When to change it
Public True False for internal data used only in the admin
Show in REST API True Setting it to False switches the editor from the block editor to the classic edit screen. Keep True if you use the block editor
Has Archive False True if you need a listing page (post type archive) such as /book/
Hierarchical False True if you want parent/child relationships, like Pages
Rewrite / Custom Rewrite Slug True / empty Enter a Custom Rewrite Slug to replace the book part of the URL with another string
Menu Position empty To change the order in the admin menu (5 to 100)
Menu Icon empty A Dashicons class name such as dashicons-book, or an image URL

Under Supports, choose the features used on the edit screen. By default, Title, Editor and Featured Image are checked. If you want excerpts or revisions, also check Excerpt and Revisions.

Under Taxonomies, checking Categories (WP Core) and Tags (WP Core) lets you use the same categories and tags as regular posts. If you want a classification only for this post type, create it after saving under CPT UI → Add/Edit Taxonomies and select this post type in Attach to Post Type.

When you are done, click Add Post Type at the bottom of the screen to save. "Books" appears in the left menu, and you can create entries just like regular posts.

Step 4: Check the front end

If your permalink setting is "Post name" or similar, the URLs look like this (for the slug book).

Page URL
Single page https://example.com/book/your-post-slug/
Archive page (when Has Archive is True) https://example.com/book/

CPT UI updates the rewrite rules after you save, so the pages normally display right away. If a single or archive page returns 404, open Settings → Permalinks and click Save Changes without changing anything; this rebuilds the rewrite rules.

How the pages look is decided by your theme's templates. In a classic theme, adding single-book.php (single page) and archive-book.php (archive page) gives the post type its own templates. In a block theme, you can add a template for this post type from the templates screen under Appearance → Editor.

If you want input fields (custom fields)

Checking Custom Fields under Supports in CPT UI enables the standard WordPress custom fields box. In the block editor, open Preferences from the options menu at the top right and turn on Custom fields; the input box then appears below the editor.

The standard box, however, asks for a "name" and a "value" every time. If you want editors to fill in a fixed set of fields, it is easier to create the fields with ACF or a similar plugin and set its location rule to this post type.

Use “Get Code” when you stop using CPT UI

Open CPT UI → Tools → Get Code to see PHP code that registers your post types and taxonomies with register_post_type() / register_taxonomy(). If you want to manage them in your own theme or plugin instead of relying on CPT UI, paste this code into your child theme's functions.php or a custom plugin, then delete the registration in CPT UI or deactivate the plugin (so the same post type is not registered twice).

The Post Types and Taxonomies tabs on the same Tools screen are import/export features for moving settings to another site that also uses CPT UI.

What happens to your posts on deletion or deactivation

  • Deleting a post type under Add/Edit Post Types only removes the CPT UI setting; the entries created with that post type stay in the database.
  • Deactivating CPT UI stops the post type from being registered, so the entries no longer appear in the admin or on the front end. They show up again when you reactivate the plugin or register the same slug again.
  • Back up the database before changing settings on a live site.

Related articles

Questions about WordPress? The publisher of this site is based in Japan and replies in Japanese. Contact (Japanese)

お気軽にご相談ください

お見積りへ お問い合わせへ
▲