Skip to main content

What is a Custom Post Type in WordPress?

Glossary image
CPT WordPress content type

A Custom Post Type (CPT) is a registered content structure in WordPress that extends the platform beyond its default content types - posts and pages - allowing developers to define entirely new categories of content with their own data, behavior, and presentation logic.

Out of the box, WordPress ships with a small set of built-in content types: posts for blog entries, pages for static content, attachments for media, and a few others used internally. While these cover many common use cases, they fall short when a site needs to manage structured, repeatable content that does not fit neatly into a blog post format. A portfolio of design projects, a directory of staff members, a catalog of products, or a library of case studies all represent content that benefits from its own dedicated type.

Custom Post Types solve this by letting developers register a new content type with a unique name, a custom label, and a specific set of capabilities. Once registered, the new type appears as its own section in the WordPress admin dashboard, complete with its own list view, editor screen, and URL structure. A CPT called project, for example, would produce URLs like /projects/my-first-project/ and appear under a dedicated "Projects" menu in the admin panel.

Registration is typically done in PHP using the register_post_type() function, either directly in a theme's functions.php file or, more commonly, inside a dedicated plugin. Using a plugin is generally preferred because it keeps content type definitions independent of the active theme, meaning the data persists even if the site's design changes.

Custom Post Types become significantly more powerful when combined with custom fields, which store additional structured data attached to each entry. The Advanced Custom Fields plugin (ACF) is one of the most widely used tools for this purpose, providing a visual interface to define and manage field groups without writing code. Together, a CPT and its associated custom fields form a flexible content model comparable to a database table with defined columns.

From a development standpoint, Custom Post Types are also fully accessible via the WordPress REST API, which means their data can be queried and consumed by JavaScript front ends, mobile applications, or headless architectures. When a CPT is registered with the show_in_rest argument set to true, it automatically gains a dedicated REST endpoint, making it straightforward to integrate with modern decoupled setups.

For SEO professionals, Custom Post Types matter because they influence how content is structured, indexed, and presented to search engines. A well-organized CPT with clean permalinks, appropriate taxonomies, and schema markup can significantly improve how a site's content is understood and ranked. Poorly configured types, on the other hand, may generate thin pages or duplicate content if archive and single-entry templates are not handled carefully.

Have a question?

Get in touch if you'd like to learn more about this topic.

Contact Us