Websites and Tech

Custom Post Type

Also called CPT, WordPress custom post type

A separate kind of content in WordPress, such as services, jobs or case studies, with its own editing screen, URL pattern and templates.

Quick facts: Custom Post Type

Category
Websites and Tech
Also called
CPT, WordPress custom post type
Level
Intermediate
Affects
Site structure, URL patterns, XML sitemaps, indexing, editor workflow
Where to see it
WordPress admin, Custom Post Type UI, Yoast or Rank Math sitemap settings, Google Search Console
In this article4
  1. How a custom post type works
  2. Why it matters
  3. Common mistakes
  4. How to act on it

A custom post type is a content type you add to WordPress alongside the built-in posts and pages, so that a distinct kind of content, such as services, properties, courses or case studies, gets its own section in the admin, its own URL pattern and its own templates.

How a custom post type works

Out of the box, WordPress gives you posts (dated, for blogs and news) and pages (standalone). A developer registers a new type in code, usually in a plugin or the theme, with a function called register_post_type. That registration sets the important options: the name editors see in the menu, the URL slug (for example /courses/), whether the type has an archive page listing every item, whether it appears in site search and whether it is public at all.

Each custom post type usually comes with custom fields for its structured details and a matching template. A training provider might have a “Courses” type where every entry shows the duration, the venue, the price and a booking button in the same layout, while blog posts keep their own design.

Why it matters

Separating content into types keeps a growing site organised. Editors find things more easily, templates stay consistent and the URL structure stays clean. For search, this structure gives Google clearer signals: all your case studies sit under one folder, linked from one archive, rather than scattered among blog posts.

The registration options also decide what Google can find. Since version 5.5, WordPress generates an XML sitemap that includes every public post type, and SEO plugins such as Yoast and Rank Math do the same by default. That is helpful for a “Services” type, but a problem for types never meant to be pages: testimonials, team members, slider items or form entries that a plugin registered as public. Each of those can generate thin, indexable URLs that dilute the site.

Common mistakes

  • Accidental public types. Plugins for sliders, FAQs or portfolios often register public types with their own URLs. Check the sitemap for anything unexpected.
  • Changing the slug after launch. Renaming /projects/ to /case-studies/ breaks every existing URL unless you add redirects.
  • Using a post type when a category would do. If the content is just blog posts on a theme, a category is simpler. A new type is for content with a genuinely different structure.
  • Registering types in the theme. If the theme is replaced, the content stays in the database but disappears from the site. Register types in a small plugin instead.
  • Archives with no content. An archive page that is only a list of titles rarely helps anyone. Give it an introduction or turn it off and build a proper hub page.

How to act on it

Open your XML sitemap index, usually at /wp-sitemap.xml or /sitemap_index.xml, and note every post type listed. For each, ask whether it should be a page in Google. Anything that should not be indexed can be set to noindex in your SEO plugin or made non-public in code, which also stops it adding to index bloat.

For new content types, decide the URL slug before you publish anything, and move type registration into a plugin so it survives a redesign. Planning post types, archives and URLs around how customers search is one of the first things I look at in WordPress SEO work, because it is far cheaper to settle before the content exists.

Do and do not

Do

  • Settle the URL slug before publishing
  • Register post types in a plugin, not the theme
  • Check the sitemap for unintended public types

Do not

  • Create a new type where a category would do
  • Rename a type's slug without redirects
  • Leave plugin-generated types indexable by default

Questions people ask about this

What is the difference between a custom post type and a category?

A category groups items of the same kind, such as blog posts about tax or about payroll. A custom post type is a different kind of content altogether, with its own fields, templates and admin screen. Use a category when the content is the same shape; use a post type when it needs different information and layout.

Do I need a developer to create a custom post type?

Not necessarily. Plugins such as Custom Post Type UI, ACF and Pods let you register types through the admin screen. A developer is useful when the type needs careful URL design, custom templates or registration in code that will survive a theme change, which is the more durable approach.

Should custom post types appear in my XML sitemap?

Only if each item is a useful page you want people to find in search, such as services, locations or case studies. Types used for building blocks, like testimonials or slider entries, should be excluded. Check your SEO plugin's settings, because many include every public type by default.

Related terms

Found this useful?

Share it, or ask an AI to summarise it

Back to the glossary

Knowing the term is the easy part

Applying it to your own site and budget is the work. Book a call and I will tell you what actually applies to you.