How to Create Custom Post Types in WordPress: 7 Steps Without Code

In this guide

  • Quick Answer: Do You Need a Custom Post Type?
  • What Is a Custom Post Type?
  • When a Custom Post Type Helps — and When It Does Not
  • Step 1: Decide on One Content Type, One Slug, and One Purpose
  • Step 2: Back Up, Then Test on a Staging Site
  • Step 3: Install Custom Post Type UI
  • Step 4: Register Your Post Type in CPT UI
  • Step 5: Add a Taxonomy So Visitors Can Filter Your Content
  • Step 6: Add Your First Items and Check the Archive Page
  • Step 7: Choose How Your Content Appears on the Front End
  • The Pods Route: Post Types, Fields, and Display in One Plugin
  • The Code Route: register_post_type() in a Plugin, Not a Theme
  • Common Mistakes That Break Custom Post Types
  • FAQ
  • The Bottom Line
  • Sources

Quick Answer: Do You Need a Custom Post Type?

If you publish the same kind of structured content again and again — books, events, team members, properties, recipes, portfolio projects — and blog posts force you to fake that structure with categories, tags, and workarounds, you need a custom post type. It gives that content its own admin menu, its own edit screen, and its own URLs, separate from posts and pages.

If you publish one or two such items, or the content fits naturally as a page, you do not. A custom post type is a structure decision, not a feature to add because it sounds advanced. The seven steps below register one without writing code, using the free Custom Post Type UI plugin, and then show you how to display it — the part most tutorials skip.

What Is a Custom Post Type?

WordPress ships with five default post types: post, page, attachment, revision, and menu. Everything you publish is one of those types, stored in the same posts table. A custom post type is a content type you register yourself when none of the built-ins fit what you want to publish. The WordPress Plugin Handbook puts it plainly: once a custom post type is registered, it gets a new top-level administrative screen that can be used to manage and create posts of that type, and it gets its own slug within the site URL structure.

That is the whole idea. A Books post type behaves like posts — title, content, featured image, publish date — but it lives under its own menu, at its own address, such as yoursite.com/books/the-name-of-the-book. Visitors, editors, and search engines can tell at a glance that a book is not a blog post. Editors stop hunting through hundreds of posts to find the one portfolio entry they need to update.

Post type Key What it holds
Post post Blog posts and news
Page page Static pages such as About and Contact
Attachment attachment Media library files
Revision revision Saved copies of posts and pages
Menu item menu Navigation menu links
Custom post type your own key, for example book Books, events, team members, properties, and more

A custom post type is not a new database table, a new site, or a page builder layout. It is a label and a set of rules applied to ordinary WordPress content.

When a Custom Post Type Helps — and When It Does Not

Use a custom post type when three things are true: the content repeats, it has its own fields or groupings, and it deserves its own archive page. Events are the classic case. An event has a date, a venue, and a price; it repeats weekly; visitors want to browse all events, then filter by city. Books work the same way: author, genre, publication year, and a shelf of their own. The same logic covers staff directories, property listings, case studies, testimonials, and course lessons.

Do not create a custom post type for a single landing page, a one-off announcement, or content that is really a blog category. A “News” post type that duplicates your blog, or a “Services” post type holding three pages, adds admin menus and URLs with no benefit and splits content that should live together. Categories and tags already group posts. Pages already hold standalone content. If your answer to “what makes this different from a post?” is only “I want a different menu label,” use a category instead.

There is one more honest limit. Registering a post type does not design how it looks. The free registration plugins create the type and its admin screens; your theme decides what visitors see, or you add a display tool. Plan the display before you register anything — Step 7 covers the options.

Band performing live on stage at a concert, an example of Events content in WordPress
A live concert — the kind of dated, repeatable content an Events custom post type is built for. Photo by Stéphane Gallay, licensed under CC BY 4.0.

Step 1: Decide on One Content Type, One Slug, and One Purpose

Write down three things before you open any plugin screen: the plural label visitors see (Books), the singular label (Book), and the technical key WordPress uses internally. The key is the decision you cannot easily undo, because it appears in URLs, database queries, and any code that later touches the type.

Keep the key short, lowercase, and singular, with underscores instead of spaces: book, not Books or my-books. The Plugin Handbook states that a custom post type identifier must not exceed 20 characters, because the post_type column in the database is a VARCHAR field of that length. Do not start a key with wp_, which WordPress core uses, and avoid a generic key such as product, which may conflict with another plugin or theme that chose the same identifier. The Handbook warns that solving duplicate post type identifiers is not possible without disabling one of the conflicting post types, so check for conflicts first if you run WooCommerce or another content plugin.

Decide the URL slug at the same time. By default the slug matches the key, so books live at /book/. Most sites prefer the plural, /books/, which you can set separately when you register the type. A generic rewrite slug can also conflict with other plugins, so do not claim /products/ on a site that may later add a shop, and do not reuse a slug already taken by a page or category.

Finally, write one sentence that defines the type: “Books holds one entry per published book, grouped by genre, with author and publication year.” If you cannot write that sentence, you do not yet know what you are building. Every later choice — which fields, which taxonomy, which archive layout — follows from it.

Step 2: Back Up, Then Test on a Staging Site

A new post type is low-risk, but it touches URLs, menus, and the admin. Take a full backup — files plus database — before you start, and do the first build on a staging copy if your host provides one. A wrong slug or a conflicting plugin then costs you minutes, not a live site. If you do not have staging yet, follow the staging-site guide to create a WordPress staging site and test changes safely before going live.

On staging, install the plugin, register the type, add three or four test items, and click through the archive and single-item pages. Check that the new menu appears, that the items publish, and that nothing else on the site changed. Only then repeat the same steps on the live site.

Step 3: Install Custom Post Type UI

Custom Post Type UI, usually called CPT UI, is the registration tool this guide uses. It provides an easy-to-use interface for registering and managing custom post types and taxonomies, with no coding required, and it is used by more than 1,000,000 active WordPress sites. It is free on WordPress.org, maintained by WebDevStudios, and version 1.19.3, released 14 July 2026, was the latest version shown on the plugin page when this guide was verified in December 2026. It does one job — registration — and it does not add custom fields or front-end display on its own. That narrow scope is a strength: it will not fight your theme or your field plugin.

Install it the ordinary way. In the dashboard, go to Plugins, then Add New, search for “custom post type ui”, click Install Now on the plugin by WebDevStudios, then Activate. A new CPTUI menu appears in the dashboard. Do not install a second registration plugin at the same time, and do not also register the same post type in code. Two registrations of one key is the most common source of the conflicts the Handbook warns about.

If you already use Pods, Advanced Custom Fields, or another tool that registers post types, use that tool instead and skip CPT UI. Every registration tool asks for the same slug, labels, and settings, and running two registrars for one type creates exactly the duplication you are trying to avoid.

Step 4: Register Your Post Type in CPT UI

Open CPTUI, then Add/Edit Post Types, and fill in the basic settings first. Enter the post type slug — the key from Step 1, such as book — then the plural label (Books) and the singular label (Book). CPT UI can auto-populate the remaining labels, such as Add New Book and All Books, from those three values. Check them once. Labels are what editors and visitors read, so a singular label that says “Books” will confuse everyone who uses the site, including you in six months.

Next, set which editing features the type supports: Title, Editor, Featured Image, Excerpt, Author, and Comments are the usual set for a Books type. Do not enable every support checkbox “just in case.” Each one adds a box to the edit screen, and an edit screen full of unused boxes is how content entry goes wrong.

Then set the visibility options. Public means the type is visible on the front end and in the admin. Has Archive creates the archive page at the type’s slug, such as /books/, so leave it on unless you deliberately want single items with no listing page. Set the custom rewrite slug to books so the archive and item URLs use the plural form. Enable REST API / block editor support so the type appears in the block editor and in tools that read content through the REST API. Hierarchical works like pages, with parent and child items; leave it off for books, events, and other flat lists. Exclude from Search is off by default, which is what you want for public content.

Save the post type. A new Books menu appears in the dashboard sidebar immediately. If it does not, check that the slug has no capital letters or spaces and that no other plugin already registered the same key, then save again. Do not change the slug after publishing items: the slug is the URL base, and changing it later breaks every link to the archive and to existing items unless you add redirects.

Step 5: Add a Taxonomy So Visitors Can Filter Your Content

A post type without a taxonomy is a pile. A taxonomy is a grouping system — categories and tags are WordPress’s built-in taxonomies — and a custom taxonomy groups your custom content the same way. For Books, the obvious taxonomy is Genre, with terms such as Fiction, History, and Biography. For Events, it might be Event Type or City. For a property listing, Location.

In CPT UI, open Add/Edit Taxonomies and create the taxonomy the same way you created the post type: a short lowercase slug such as genre, a plural label (Genres), a singular label (Genre), and the post type it attaches to — Books. Choose hierarchical if terms should nest, like categories, so Fiction can have a child term for Historical Fiction. Choose non-hierarchical, like tags, if terms are free-form labels with no parent and child. Most content taxonomies are hierarchical, because visitors browse a tree, not a cloud of unrelated labels.

Add the terms themselves under the new taxonomy menu. Keep terms short, consistent, and few. Twelve genres you actually use beat forty you invented in one sitting. Every term gets its own archive page, such as /genre/fiction/, which is useful only if the term has content behind it. An empty term archive is a dead end, so do not create terms for content you do not have.

You can also attach the built-in Categories and Tags taxonomies to a custom post type, but it usually muddles both archives. A dedicated taxonomy keeps Books separate from blog posts, which is the reason you created the type.

Flat file storage cabinet with labelled drawers for organising content by taxonomy
A flat file storage cabinet with labelled drawers — the physical equivalent of a taxonomy. Photo by Myotus, CC0.

Step 6: Add Your First Items and Check the Archive Page

Add three or four real items, not placeholders. For Books, that means a real title, a real description, a featured image, and a genre term on each. Placeholder titles such as “Test 1” teach you nothing, because you cannot judge an archive page filled with filler. Use content you intend to keep, or delete the test items cleanly afterwards.

Open the archive page at the type’s slug, such as yoursite.com/books/, and open one single item. Check three things. First, the archive lists your items and the single item displays its title, content, and featured image. Second, the genre term links work and lead to filtered lists. Third, the URLs look the way you planned — /books/ for the archive, /books/book-title/ for an item, /genre/fiction/ for a term.

If a new item or archive returns a 404 page while the rest of the site works, the rewrite rules were not flushed after the type was registered. This is normal and easy to fix: go to Settings, then Permalinks, and click Save Changes without changing anything. WordPress regenerates its rewrite rules, and custom post type 404s are fixed by flushing the rules after the type is registered. Do not change the permalink structure to fix a 404 — that changes every URL on the site. Re-save, then test the same address again.

While you are here, check who can do what. A new post type follows WordPress’s normal capability system, so editors and administrators can manage it by default, but a custom role may need its capabilities adjusted. If a team member cannot see the new menu, that is a roles question, not a post-type bug. The WordPress user roles guide explains how permissions are assigned per role.

Step 7: Choose How Your Content Appears on the Front End

This is the step that decides whether the post type is useful or merely registered. Your theme controls the archive and single-item layouts by default. Many modern block themes render a custom post type archive acceptably with their standard templates, and the single item shows the title, content, and featured image. If that looks right, you are done. Add the archive to your navigation menu under Appearance, then Menus — custom post types appear there as archive links — so visitors can actually reach it.

If the archive looks bare, or the single item shows the title and content but none of the extra information you planned, you need a display route. Three realistic options exist. First, Pods, covered in the next section, adds fields and its own blocks and templates for displaying them, all without code. Second, a page builder or block plugin that supports custom post types can build the archive and single layouts visually; check that it lists your post type before you commit to it. Third, a developer can add archive and single templates to a child theme. That is the most flexible route and the most expensive, so reserve it for types that carry real business value.

Do not install a display plugin that registers its own duplicate post type. Test the display on staging with real content, on a phone as well as a desktop, before you announce the new section.

The Pods Route: Post Types, Fields, and Display in One Plugin

Pods — Custom Content Types and Fields — takes the opposite approach to CPT UI. Where CPT UI registers the type and stops, Pods creates the content type, adds custom fields to it, and provides blocks, shortcodes, widgets, and templates for showing those fields. Its WordPress.org page lists custom post types, custom taxonomies, and Advanced Content Types, plus custom settings pages, and states that every field type is free, with over 25 input types across more than 20 field types.

The Pods workflow is: install and activate Pods, open Pods Admin, then Add New, choose Create a New Content Type, select Custom Post Type, and enter the singular and plural labels. Then add fields on the same screen — a text field for Author, a date field for Publication Date, a number field for Pages, a relationship field linking a book to its author entries. Pods lets you show those fields with its blocks in the block editor, or with a Pods Template and shortcode, without writing PHP.

Choose Pods over CPT UI when fields are the point of the exercise. A Books type that only needs a title and description is simpler in CPT UI. A Books type that needs author, ISBN, publication date, price, and a relationship to an Authors type is a Pods job, or a CPT UI plus a separate fields plugin job. Either combination works; what does not work is registering the type in one tool, adding fields in a second, and displaying them with a third, without checking that all three agree on the field names. Pick one stack and keep it.

Pods also offers Advanced Content Types, which store content in their own database table outside the normal WordPress post system. Do not use those for ordinary content. They suit large, structured datasets that need their own tables, and they behave differently from posts in search, feeds, and plugins. For books, events, and team members, the ordinary custom post type is the right choice.

The Code Route: register_post_type() in a Plugin, Not a Theme

If you are comfortable with a small amount of PHP, the code route is short and gives you full control. The Plugin Handbook’s minimal example registers a Products type with register_post_type(), hooked to init, with labels, public visibility, and an archive. Adapted for the Books example in this guide, the same pattern is:

function bh_register_book_post_type() {
    register_post_type( 'book', array(
        'labels'      => array(
            'name'          => 'Books',
            'singular_name' => 'Book',
        ),
        'public'      => true,
        'has_archive' => true,
        'rewrite'     => array( 'slug' => 'books' ),
        'show_in_rest' => true,
        'supports'    => array( 'title', 'editor', 'thumbnail', 'excerpt' ),
    ) );
}
add_action( 'init', 'bh_register_book_post_type' );

Put that code in a small custom plugin, not in your theme’s functions.php and not in a child theme. The Handbook recommends a plugin so that user content remains portable even if the theme is changed. A post type registered in a theme vanishes the moment the theme changes, and every book, event, or property entry disappears from the admin with it — the content stays in the database, but nothing can display or edit it until the type is registered again. That is the single most expensive beginner mistake in this subject, and it is entirely avoidable.

If you take the code route, flush the rewrite rules once, when the plugin is activated, rather than on every page load. In practice, saving Settings, then Permalinks once after activation does the same job for a site you manage by hand. If you later export code from CPT UI, paste it into a plugin the same way, and deactivate CPT UI for that type so the type is registered in exactly one place.

Common Mistakes That Break Custom Post Types

Mistake What happens Fix
Registering the type in a theme Content vanishes from the admin when the theme changes Move registration to a plugin, or to CPT UI / Pods
Generic or conflicting key, such as product Two plugins register one key; one type wins and the other breaks Use a short, specific key; check for conflicts first
Key over 20 characters, or starting with wp_ WordPress truncates or conflicts with core identifiers Shorten the key; never use the wp_ prefix
Changing the slug after publishing Archive and item URLs break; links and search results 404 Choose the slug in Step 1; if you must change it, add redirects
Forgetting to flush permalinks New archive and items return 404 Settings, then Permalinks, then Save Changes, no structure change
No taxonomy, or forty empty terms Visitors cannot filter; empty archives look abandoned One taxonomy, a few real terms, added before launch
Registering in two tools at once Duplicate registrations, unpredictable menus and URLs One registrar per type; deactivate the other for that type
No display plan A working post type that renders as a plain list Decide the display route in Step 7 before launch
Enabling every support checkbox Edit screens cluttered with boxes nobody uses Enable only the features editors actually fill in

FAQ

Do custom post types hurt SEO?

No, when they are public, have archives, and carry real content. A Books archive with useful entries is a normal set of indexable pages. A post type with thin, duplicated, or empty entries hurts the same way thin blog posts hurt. Keep titles specific, write a real description for each item, and do not publish empty term archives.

Can I convert existing posts into a custom post type?

Yes, with a post-type switcher plugin or by changing the post type in code, but plan it first. The URLs change, the category and tag assignments may not carry over, and any template that assumed posts will need checking. Test the conversion on staging, redirect the old URLs, and check the converted items one by one. Converting twenty posts is a small job. Converting two thousand is a migration.

Do I need a custom post type for a portfolio if my theme already has one?

No. If your theme or a portfolio plugin already registers a Portfolio type, use it. Registering a second one creates two competing menus and archives. Check what is already registered before you create anything.

What happens if I deactivate CPT UI or Pods?

The post type stops being registered, so its menu disappears and its items stop displaying, but the content remains in the database. Reactivating the plugin, or registering the same key in code, brings it back. That is why the Handbook insists on a plugin for code registration, and why you should export your CPT UI settings before you remove it. Never delete a registration plugin on a live site without a backup and a replacement registration ready.

Can custom post types appear in WordPress search?

Yes, if the type is public and not excluded from search. CPT UI exposes an Exclude From Search setting; leave it off for public content. Search behaviour also depends on your theme and any search plugin, so test a search for an item’s title on staging after registering the type.

Are custom post types the same as custom fields?

No. A post type is a kind of content. A custom field is an extra piece of information attached to one item, such as a book’s ISBN or an event’s date. CPT UI registers types and taxonomies; it does not add fields. Pods and Advanced Custom Fields add fields, and can also register types. You usually need both ideas, but they are separate settings in separate tools.

The Bottom Line

A custom post type earns its place when content repeats, has its own structure, and deserves its own archive. Decide the key and slug first, test on staging, register it once with CPT UI or Pods, add one taxonomy with a few real terms, flush the permalinks, and settle the display before you launch. Keep the registration in a plugin, not a theme, and keep the key short, specific, and free of the wp_ prefix. Do that, and a Books, Events, or Properties section becomes ordinary WordPress content — easy to edit, easy to browse, and easy to keep — instead of a workaround that breaks the next time the theme changes.

Sources

Last verified: 3 December 2026. Plugin details checked on WordPress.org on 3 December 2026.

Leave a Comment