Custom post types explained for non-developers

A custom post type is a new kind of content, such as Projects or Team, with its own admin menu, URLs and layout. When you need one and how it is built.

By Sohail Hussain21 November 20265 min read

A custom post type is a new kind of content in WordPress, alongside the built-in Posts and Pages. Projects, Team members, Locations, Jobs and Case studies are typical examples. Each gets its own item in the admin menu, its own list screen, its own URL pattern (such as /projects/new-plant-pune/) and its own template, so every item looks consistent and can be listed, filtered and searched apart from your blog. You need one when you have more than a handful of items that share the same shape.

When we plan a site in our website design and development work, agreeing this content model is one of the first steps, before any design.

What is a custom post type, in plain terms?

WordPress stores almost all content in one database table, with a label saying what type each item is. Blog posts have the type post. Pages have the type page. Files in the media library are attachment. Navigation menu items and synced patterns are post types too.

A custom post type is simply another label, with its own settings. Once it is registered, "Projects" appears in the admin menu with "All Projects" and "Add New", just like Posts. Editors add projects. The site shows them at their own addresses and in their own lists.

WooCommerce products are a custom post type. So are events in most event plugins. You have probably used one without knowing it.

When does your site need one?

When most of these are true:

  • You have, or will have, more than about ten items of the same kind.
  • Each item has the same pieces of information. A project has a client, a sector, a year, a location and photos.
  • Visitors need to browse or filter them, or they appear in several places on the site.
  • They are not news or articles, which is what Posts are for.
ContentBest homeWhy
News and articlesPostsDated, categorised, included in the RSS feed
About, Contact, services overviewPagesOne-off pages, designed by hand
Projects or case studiesCustom post typeMany items, same structure, filtered by sector
Team membersCustom post typeReused on About, service and location pages
Office locationsCustom post typeAddress, map and hours on each, listed together
Job openingsCustom post typeOpened and closed often, listed on Careers
TestimonialsCustom post type, or a pattern if there are only a fewReused across pages
Products for saleWooCommerceIt registers its own product type

The common mistake is the opposite one: forty project pages built as Pages, each laid out by hand, plus a Projects page someone updates manually. It works until the fortieth. Then every redesign means editing forty pages.

How do post types, taxonomies and custom fields fit together?

Three pieces, each with one job:

  • The post type is the kind of thing: a Project.
  • Taxonomies group items: Sector (Manufacturing, Healthcare) or Service. Categories and Tags are the built-in taxonomies for posts, and you can add your own to any post type.
  • Custom fields hold each item's details: client name, year completed, project value, a gallery. WordPress stores these as post meta, and plugins such as Advanced Custom Fields give editors a proper form to fill in.

Together they replace a free-form page with a structured record. The editor fills in a form, and the template decides how it looks. That is how a site with 200 projects stays consistent.

How is a custom post type created?

Either in code, or through a plugin's settings screen. Both produce the same result.

In code, a developer calls register_post_type() on the init hook, ideally in a small site plugin. This example registers Projects, editable in the block editor, with a listing page at /projects/:

php
<?php
/**
 * Plugin Name: Site content types
 */

add_action( 'init', function () {
	register_post_type( 'project', array(
		'labels'       => array(
			'name'          => 'Projects',
			'singular_name' => 'Project',
		),
		'public'       => true,
		'has_archive'  => true,
		'show_in_rest' => true,
		'menu_icon'    => 'dashicons-portfolio',
		'supports'     => array( 'title', 'editor', 'thumbnail', 'excerpt' ),
		'rewrite'      => array( 'slug' => 'projects' ),
	) );
} );

A few details from the register_post_type() reference that matter in practice:

  • The key, project here, must be 20 characters or fewer and use only lowercase letters, numbers, dashes and underscores.
  • show_in_rest must be true for the post type to use the block editor. Without it, editors get the old classic editor.
  • After registering, go to Settings → Permalinks and click Save once so the new URLs work. Code should never flush rewrite rules on every page load.

Choose the URL slug with care, because changing it later means redirects. Our URL slug generator turns a label into a clean slug.

Without code, Advanced Custom Fields and its fork Secure Custom Fields both include a screen for registering post types and taxonomies, which suits sites where nobody writes PHP.

What goes wrong with custom post types?

  • Registered in the theme. If the code lives in the theme's functions.php, switching themes makes the post type vanish from the admin. The content is still in the database, but nobody can see it. Register post types in a plugin, as above.
  • Too many types. "Projects" and "Featured projects" should be one type with a field or a taxonomy. Each extra type is another list screen and template to maintain.
  • Thin archive pages. An archive that lists twelve titles and nothing else is a weak page for search. Give it an introduction and useful filters, or set has_archive to false and build the listing on a normal page instead.
  • Things indexed by accident. Public post types are added to WordPress's built-in XML sitemap automatically. Content that should not appear in search, such as internal staff profiles, should not be public.

Do you need a developer?

To register a post type through a plugin's settings screen, no. For the templates that show it well (the archive layout, the single-item design, the filters), usually yes, at least once. After that, editors add items without anyone's help, which is the point.

If your site is a dozen pages and a blog, you do not need custom post types at all. They earn their place when content repeats. For how they fit into a WordPress setup overall, see WordPress for business websites. If you are deciding how the site should be built around them, Elementor vs Gutenberg vs a custom theme covers that choice.

Was this guide useful?

Questions

Frequently asked.

Will custom post types show up in Google?

Yes, if they are public. Each item gets its own URL, and WordPress adds public post types to its built-in sitemap at /wp-sitemap.xml. SEO plugins include them in their own sitemaps and let you set titles and descriptions per item. Make sure each item has enough unique content to be worth indexing.

What happens to custom post types if I change theme?

If the post type is registered in a plugin, nothing: the new theme shows the items with its default templates until you design new ones. If it was registered in the old theme, the items disappear from the admin until the code is moved into a plugin. The content itself is never deleted.

Can I move existing pages into a custom post type?

Yes. A plugin such as Post Type Switcher changes the type of individual items, and a developer can convert many at once with WP-CLI. The URLs change when the type changes, so plan redirects from the old addresses to the new ones before converting anything.

Sohail Hussain

Founder, MSH Technologies

Sohail has designed and built websites, web apps and AI products for over 12 years, for clients from Singapore-based industrial groups to early-stage SaaS startups. He writes about what actually worked.

Keep reading

Related guides.

All posts

Your next move

Like what you see? Tell us about it.

A process that takes too long, a website that undersells you, or an idea ready to take shape. Tell us where you are and we will suggest a useful next step.

India · Working with clients worldwide

Sohail, Founder, replies within 1 working day (Mon–Sat, IST). Free and no obligation.