WordPress
Custom post type
Also called CPT.
Custom post type is a content type you register in WordPress alongside posts and pages, such as events, products, or case studies. It gets its own admin menu, URL structure, and archive.
How it is measured
You create one with register_post_type( 'event', $args ) on the init hook. The name is stored in the post_type column of wp_posts and must be 20 characters or fewer, lowercase. Key arguments are public, has_archive, supports, rewrite, and show_in_rest, which must be true for the block editor and the REST route /wp-json/wp/v2/event.
To count what exists, run wp post list --post_type=event --format=count, or SELECT post_type, COUNT(*) FROM wp_posts GROUP BY post_type to see everything on the site.
Worked example
A conference site registers a post type called session with has_archive set to program. After deploying, /program/ and /session/keynote-day-1/ both return 404, even though editing sessions in wp-admin works. The code ran, but the rewrite rules were saved before the type existed.
Visiting Settings > Permalinks and clicking Save flushes the rules, and both URLs load. The developer then adds flush_rewrite_rules() to the plugin activation hook only, not to init.
How it differs
A custom post type defines what kind of thing a post is, while a taxonomy defines how those things are grouped. Events are a type, and Venue or Track is a taxonomy that can attach to events. You can have a type without any taxonomy, and a taxonomy can span multiple types.
Common errors
Forgetting to flush rewrite rules after registering. Putting register_post_type in the theme, so the content vanishes from wp-admin on a theme switch. Leaving show_in_rest off and wondering why the block editor will not load. Using a name that collides with a reserved word like post, page, or action. Calling flush_rewrite_rules() on every page load.
In practice
Put type registration in a plugin, not the theme. Give each type its own capability_type if non-admins will edit them, and write a short note listing the fields it supports. Before launch, hit one single URL and the archive on staging.