Key takeaways
- Custom post types let you store distinct kinds of content, such as projects, team members or case studies, separately from ordinary posts and pages.
- They work best alongside custom taxonomies and custom fields, which give the content consistent structure.
- Register custom post types in a plugin rather than a theme, so your content does not disappear if the design changes.
Out of the box, WordPress gives you two main ways to publish content: posts, which are designed for dated blog articles, and pages, which suit standalone content such as an About page or a Contact page. For many small websites, that is enough. But as soon as a site needs to publish a different kind of thing, such as portfolio projects, staff profiles, properties, events, courses or locations, squeezing everything into posts and pages becomes awkward.
That is where custom post types come in. This guide explains what they are, when they are worth using, how they fit with taxonomies and custom fields, and the practical decisions to make before you build them.
What is a custom post type?
Inside WordPress, almost every piece of content is stored as a "post" of some type. Blog posts are the post type post, pages are page, and things like media attachments and menu items are post types too. A custom post type is simply a new type you define yourself, with its own name, its own section in the admin menu and its own settings.
For example, an architecture practice might register a "Projects" post type. Editors would then see a Projects item in the dashboard sidebar, add new projects there, and those projects would live at addresses such as /projects/riverside-house/, completely separate from the blog.
Why not just use posts and categories?
It is possible to fake a portfolio by creating a "Projects" category and publishing projects as blog posts. Plenty of sites do this. The trouble is that it mixes very different content together:
- Projects appear in the main blog feed and blog archive unless you write extra code to exclude them.
- Editors have to remember which category to use, and mistakes are easy.
- Dates, authors and comments, which make sense for articles, often make little sense for a project or a team member.
- It becomes harder to give each type of content its own layout, fields and URL structure.
A dedicated post type keeps things tidy. Editors know exactly where to go, templates can be designed specifically for that content, and the blog stays a blog.
Common examples on business websites
Custom post types suit any content that has a repeating, predictable shape. Typical examples include:
- Portfolio or case studies, each with images, a summary and a description of the brief.
- Team members, each with a photo, job title and short biography.
- Services, where each service needs a consistent page layout.
- Events or courses, with dates, venues and booking links.
- Properties or listings, with location, features and a gallery.
- Locations or branches, each with an address, opening hours and a map.
- Testimonials, which can then be pulled into different pages automatically.
- Downloadable resources, such as guides or brochures.
If you find yourself copying the same page layout over and over and filling in the same set of details each time, that content is a strong candidate for its own post type.
Taxonomies: organising custom content
A taxonomy is a way of grouping content. WordPress posts come with two built-in taxonomies: categories, which are hierarchical, and tags, which are flat. You can attach these to a custom post type, but it is usually clearer to create custom taxonomies that fit the content.
A Projects post type might have a "Sector" taxonomy (residential, commercial, education) and a "Service" taxonomy (new build, extension, refurbishment). An Events post type might use "Event type" and "Location". Each taxonomy gets its own archive pages, which visitors can browse and search engines can index, so they also help shape the site's navigation structure.
Think carefully before creating lots of taxonomies with only a handful of items in each. Thin archive pages with one or two entries offer little to visitors and can clutter a site.
Custom fields: giving content structure
A custom post type on its own still only gives editors a title and a main content area. The real benefit comes when you add custom fields: specific boxes for specific pieces of information. A Team post type might have fields for job title, email address, LinkedIn profile and photo. A Property post type might have fields for number of bedrooms, tenure and a floor plan upload.
WordPress has a basic built-in custom fields feature, but most sites use a dedicated plugin to build friendly editing screens. Advanced Custom Fields is a widely used option, and there are others with similar features. Structured fields mean:
- editors fill in a clear form instead of formatting everything by hand,
- every entry looks consistent on the front end,
- information can be reused, filtered and sorted, for example listing events in date order, and
- structured details can feed into schema markup where that is appropriate.
How custom post types are created
With code
Developers register post types using the WordPress function register_post_type(), usually hooked into WordPress's init action. The function accepts a long list of options: the labels shown in the admin, whether the type is public, whether it has an archive page, which editor features it supports, what URL slug it uses and whether it appears in the REST API and block editor. Taxonomies are registered in a similar way with register_taxonomy().
With a plugin
If you prefer not to write code, several plugins provide a settings screen for creating post types and taxonomies. Some custom field plugins now include this feature as well. This is convenient, but it does mean the site relies on that plugin continuing to be maintained, so it is worth including in any WordPress plugin audit.
Where the code should live
This is one of the most important decisions. If post types are registered inside your theme's functions.php file, they are tied to that theme. Switch themes and the Projects menu disappears. The content is still in the database, but it vanishes from the admin and the front end until the post type is registered again.
The safer approach is to register post types in a small site-specific plugin or a must-use plugin. That keeps your content model separate from your design, so a future redesign or a move to a new theme does not break anything. If you do customise a theme, a child theme is the right place for design changes, but content structure still belongs in a plugin.
Displaying custom post types
Once a post type exists, you need templates to show it. Classic themes use template files following the WordPress template hierarchy, such as single-project.php for an individual project and archive-project.php for the listing page. Block themes use the Site Editor, where you can create templates for the new type visually. Page builders typically offer their own template systems too.
You will usually want:
- a single template for each entry,
- an archive or listing page, often with filters by taxonomy,
- taxonomy archive templates, and
- a way to feature selected entries elsewhere, such as recent projects on the homepage.
Planning your content model
Before building anything, it helps to sketch out the content model on paper. For each kind of content, ask:
- Does it have its own page? Testimonials might not need individual URLs; projects probably do.
- What fields does every entry need? List them, and mark which are required.
- How will visitors browse it? This shapes your taxonomies.
- What URL structure makes sense? Choose clear, short slugs such as
/projects/or/team/. - Who will edit it? Combined with WordPress user roles, you can control who can add or publish each type.
- How will it connect to other content? For example, linking a case study to the service it relates to.
Getting this right at the start is far easier than restructuring later, when content has to be moved and URLs redirected.
SEO considerations
Custom post types are treated like any other content by search engines, so the usual principles apply. Each entry should have a unique title, a useful description and genuinely helpful content. A few specific points are worth checking:
- Make sure your SEO plugin is set to include the post type in its XML sitemap, if you want those pages indexed.
- Decide whether taxonomy archives should be indexed; very thin ones may be better left out.
- If a post type exists only to feed content into other pages, such as testimonials, consider making it non-public so it does not create stray URLs.
- If you change a post type's slug after launch, set up redirects from the old addresses.
Common mistakes to avoid
- Registering post types in the theme, so they vanish on a redesign.
- Creating a post type for content that only ever has one or two entries; a normal page would do.
- Using a slug that clashes with an existing page, which can cause confusing conflicts.
- Forgetting to enable block editor support when editors expect it.
- Building lots of custom fields without clear labels or instructions for editors.
- Leaving unused post types and fields behind after a site changes direction.
How Prism Works Studio can help
Prism Works Studio plans and builds WordPress websites for UK businesses, including content models, custom post types and editor-friendly admin screens. Explore our website and ecommerce development service, see our pricing or get in touch to talk through your site.
FAQs
Do I need a developer to create custom post types?
Not necessarily. Plugins can create them through a settings screen. A developer is useful when you need custom templates, complex fields or a clean, plugin-light setup.
Will I lose content if I remove a custom post type?
Unregistering a post type hides it, but the content generally remains in the database. Registering it again with the same name usually brings it back. Always take a backup before making structural changes.
Can custom post types use the block editor?
Yes, provided the post type is registered with REST API support and the editor feature enabled. Without that, WordPress falls back to the classic editing screen.
What is the difference between a custom post type and a custom field?
A custom post type is a new kind of content, such as Projects. Custom fields are individual pieces of information attached to content, such as a project's location or completion photos.
Are custom post types good for SEO?
They are neutral in themselves. They can help by giving content clear structure, logical URLs and dedicated templates, but the quality of the content still matters most.