Custom post types and custom fields in WordPress explained

What WordPress custom post types, taxonomies and custom fields are, when to use them, how to create them with code or plugins and best practices.

Usman Muhammad UsmanUpdated October 13, 2026
Custom post types and custom fields in WordPress explained

WordPress starts with posts and pages, but many sites need other kinds of content: team members, case studies, properties, events, products or testimonials. Custom post types and custom fields let you structure that content properly, which makes it easier to manage, display and rank. Here is how they work and how I use them on client sites.

What custom post types are

A custom post type is a new content type with its own section in the dashboard, its own URLs and its own templates. For example, a ‘Projects’ post type might live at /portfolio/project-name/ and appear in a Projects menu in the admin. Each project is still stored like a post, but separated from blog posts.

Using a dedicated post type means editors know exactly where to add content, archive pages list items automatically and templates can display each type consistently. The portfolio and certificates on this site work this way: each project is an entry with its own fields, not a hand-built page.

Custom fields add structure

Custom fields store specific pieces of information alongside the main content, such as a property’s price, a team member’s job title, an event date or a project’s live URL. Instead of typing these into the body text, editors fill in labelled fields, and the template displays them in the right place.

Structured fields keep design consistent and make content reusable. A project’s industry, country and platform can be shown on the project page, used for filtering on the archive and output as structured data for search engines. Changing the design later only means updating the template, not editing every entry.

Which content structure?
Use it forExample
PageUnique contentAbout, Contact
PostDated articlesBlog posts
Custom post typeMany similar itemsProjects, properties
Custom fieldRepeated detailsPrice, date, URL
TaxonomyGrouping itemsIndustry, location

Taxonomies for grouping

Taxonomies group content. Posts use categories and tags, and you can create custom taxonomies for your post types, such as Industry or Location for projects, or Department for team members. Each term gets an archive page, which can be useful for SEO when it targets a real search.

Choose taxonomies carefully. Too many overlapping terms create thin archive pages that dilute SEO. A small number of meaningful groupings, each with a short introduction on its archive page, works better than dozens of tags with one item each.

Creating them with code

Developers register post types with register_post_type and taxonomies with register_taxonomy, usually in a small custom plugin so the content survives theme changes. Set show_in_rest to true so the block editor and REST API can use them, and choose a clear slug for URLs.

Custom fields can be added with register_post_meta and a meta box, or with a fields framework. After adding or changing post types, visit Settings > Permalinks and click save to refresh URL rules, otherwise new URLs may show 404 errors.

Creating them with plugins

Advanced Custom Fields, Meta Box, Pods and Custom Post Type UI let you create post types, taxonomies and fields through the dashboard. ACF is especially popular for fields and now also registers post types. These tools are reliable and save time, especially for non-developers.

If you use a plugin, document what each post type and field is for. Removing the plugin later can make the content inaccessible in the dashboard, although the data remains in the database. For long-term projects, some developers export field definitions to code so they live in version control.

Displaying custom content

In classic themes, templates such as single-project.php and archive-project.php control how each type is displayed. In block themes, you create templates in the Site Editor and use blocks that display post fields. Page builders such as Elementor Pro can design dynamic templates using custom fields too.

Use the Query Loop block or your builder’s loop features to show lists of custom content on other pages, such as the latest three case studies on the homepage. Filter by taxonomy to show related items, such as projects in the same industry, which also strengthens internal linking.

SEO for custom post types

Make sure each public post type is included in your XML sitemap, has unique titles and meta descriptions and outputs appropriate schema, such as Article, Product, Event or JobPosting. SEO plugins let you set default title patterns and schema types for each post type.

Decide which post types should be public. Testimonials or internal content blocks may not need their own URLs; set them to non-public so they do not create thin pages. Check archive pages too, adding introductory text so they are more than a list of links. See XML sitemaps and robots.txt.

Planning content models before building

Before creating post types, sketch the content model: which types exist, which fields each one has, how they relate and where each appears on the site. For example, a project might link to a client, an industry and several services. Writing this down prevents duplicated fields and confusing admin screens later.

Involve the people who will edit content. Field labels and instructions should use their language, not developer terms. Mark required fields, set sensible defaults and group related fields together. A clear content model is one of the best investments in a long-lived site, and it makes future redesigns much faster.

When to use them

Use a custom post type when you have many items of the same kind that share fields and need their own pages or listings. Use a page when content is unique, such as an About page. Use custom fields whenever the same pieces of information appear on many entries.

Well-planned content structures make sites easier to manage for years. If you are planning a site with portfolios, listings, directories or resources, I design these structures as part of my WordPress development service, so editors get a clean admin and visitors get consistent pages.

Key takeaways

  • Custom post types separate content like projects or listings from blog posts.
  • Custom fields keep repeated details structured and consistent.
  • Register post types in a plugin so content survives theme changes.
  • Include public post types in sitemaps and give archives real content.

Frequently asked questions

Do custom post types slow down WordPress?

No. They use the same database tables as posts. Poorly written queries or too many fields on one page can slow things, not the post type itself.

Is ACF free?

Advanced Custom Fields has a free version with core field types. ACF Pro adds repeaters, flexible content and options pages.

Why do my custom post type pages show 404 errors?

Usually the permalink rules need refreshing. Go to Settings > Permalinks and click Save Changes.

Can WooCommerce products have custom fields?

Yes. Products are a custom post type, so you can add fields and display them on product pages.

Should I use a custom post type for testimonials?

It helps manage them, but they often do not need public URLs. Set them as non-public and display them on other pages.

Free website audit

Get a free audit of your website

Tell me your URL and I'll send a short, prioritized list of the speed, SEO and security fixes that will make the biggest difference.

  • No obligation, no sales call
  • 5.0 rating on Google and Upwork
  • Reply within one business day
Written by Muhammad UsmanWeb Development Team Lead with 5+ years building WordPress, WooCommerce, Shopify and Wix websites. Experience · Certificates About me

More on WordPress & WooCommerce

All WordPress & WooCommerce articles

Have a project in mind?

Tell me what you're building and I'll reply with next steps and an estimate.