Websites and Tech

Custom Post Type

Also called CPT

A content type beyond posts and pages, with its own fields, template and URL path, for repeating structured entries.

Quick facts: Custom Post Type

Category
Websites and Tech
Also called
CPT
Level
Intermediate
Affects
Content structure, URL paths, templates, editing consistency
Where to see it
WordPress admin menu, registration plugins, custom field plugins
In this article4
  1. How a custom post type works
  2. Why custom post types matter
  3. Common mistakes with custom post types
  4. Getting it right

How a custom post type works

WordPress ships with a handful of content types — posts, pages, attachments, navigation menu items. A custom post type adds another one with its own name, its own admin menu, its own template and usually its own URL path. Case studies, properties, courses, staff profiles, events and job listings are typical examples.

Registering one is a piece of code, normally in a plugin, that declares the type’s name, its URL behaviour, whether it has an archive listing, which editing features it supports and which taxonomies apply to it. From there the entries behave like any other content: they are edited in the same screen, they can be assigned custom fields, and a template file decides how a single entry and the listing look.

Why custom post types matter

They keep content that has a shape from being flattened into free text. A property has a location, a price band and a number of rooms; a course has a duration, a level and an outcome. Stored as structured entries, those attributes can be filtered, sorted, reused across the site and marked up as structured data. Stored as paragraphs inside a page, they can only be read.

They also protect the editing experience. A team that has a Case Studies menu with the right fields already waiting will produce consistent entries. A team told to copy the last page and change the words will produce twenty variations, and the inconsistency shows up in the templates, the internal linking and eventually in search.

Common mistakes with custom post types

The first is creating one when a category would do. If the entries are simply articles about a topic, they are posts, and splitting them into a separate type only fragments the blog and its internal links. The test is whether the entries have their own fields and their own template, not merely their own subject.

The second is registering the type in the theme. Change the theme and the content becomes invisible, still in the database but unreachable — a real risk during any redesign. Types belong in a plugin. The third is neglecting the URL structure and the archive: a type registered carelessly can produce a thin listing page competing with a service page you already rank with, or an archive nobody wants indexed.

Getting it right

Decide the fields before the type, because the fields are the reason the type exists. Register it in a plugin so it survives a redesign, choose a URL path you are willing to keep, and settle deliberately whether the archive should exist, be indexed, or be replaced by a curated page you control.

Give each entry a single clear purpose so it does not compete with a page you already publish, and check that a search engine can reach entries through real links rather than only through a filter. That planning is where a structured content model earns its keep, and it is the part of custom web development most worth doing carefully before anything is built.

Do and do not

Do

  • Decide the fields before creating the type
  • Register the type in a plugin, not the theme
  • Choose a URL path you can keep permanently

Do not

  • Create a type where a category would do
  • Leave a thin archive indexed by accident
  • Let entries compete with an existing service page

Questions people ask about this

When should I use a custom post type instead of a page?

Use one when you have several entries that share the same shape and will keep growing — case studies, properties, courses, team members. Pages are for one-off content with individual layouts. If you find yourself copying a page and swapping the details each time, that repeated shape is what a custom post type exists for.

Will a custom post type help my SEO?

Indirectly. It does not give content any ranking advantage on its own. What it gives you is consistent templates, sensible URLs, reusable fields and clean structured data, which are the things that do influence how well pages are understood. A badly planned type with a thin archive can just as easily do harm.

What happens to my entries if I change theme?

If the type was registered in a plugin, the entries stay reachable and only their appearance needs a new template. If it was registered in the old theme, the content remains in the database but disappears from the admin area and the front end until the registration is restored. Register types in plugins.

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.