What is a Post Type in WordPress?
A post type is the classification WordPress uses to tell different kinds of content apart. Every item, whether a blog post, page, media attachment, or revision, lives in the wp_posts database table and is distinguished by its post_type value, which controls how it’s edited and displayed. Plugins and themes can register custom post types.
More About Post Types
A post type is how WordPress classifies content: posts, pages, media attachments, revisions, and navigation menus are all post types, stored in one database table and told apart by a type label. WordPress started life as a blogging platform, so posts came first. Every other kind of content reuses the same structure.
Post types keep different kinds of content separate, so each kind gets its own admin screens and templates. Don’t confuse them with categories and tags: those are taxonomies, which group content of the same kind.
How post types work
Every post type lives in the same wp_posts database table, and a column called post_type records which kind each item is. That one value decides which editing screen the item gets in the admin and which template displays it: themes can target a type with single-{post-type} and archive-{post-type} template files, falling back to index.php when nothing more specific exists. That’s why a product and a blog post can share one database yet look nothing alike.
Default post types in WordPress
Every install ships with a set of built-in post types. The WordPress Theme Handbook lists the most common:
- Post: timestamped entries shown newest first in your blog feed and RSS, organized with categories and tags.
- Page: undated, standalone content you can nest in parent and child hierarchies. Pages traditionally skip categories and tags.
- Attachment: every file uploaded through the media library, along with its metadata.
- Revision: the saved history of another item, kept so you can roll back changes.
- Navigation menu item: each link in a menu, stored as its own entry.
- Block template and template part: the layouts a block theme saves, stored as
wp_templateandwp_template_part.
WordPress also stores a theme’s Additional CSS and the Customizer’s changesets as post types, though you’ll never edit either one directly.
Custom post types
When your content fits none of the defaults, a custom post type gives it its own home. E-commerce plugins usually register their own: WooCommerce, for example, stores every product as the product custom post type.
You can register a custom post type with a few lines of code or with a plugin, no coding required. If you’re weighing whether your content needs one, our step-by-step guide to custom post types covers the decision and the setup.
Frequently Asked Questions
What’s the difference between a post type and a post format?
A post type classifies what kind of content an item is (post, page, product). A post format is a piece of meta information a theme can use to style a post differently, such as aside, gallery, or quote. See the post format entry for the full list.
Why are revisions and navigation menus post types?
Because anything WordPress stores as content goes in the wp_posts table. Revisions are the saved history of other post types, used to roll back mistakes, and each menu link is stored as a nav_menu_item post. Neither gets a Posts-style editing screen, but both are post types.
Are WooCommerce products and orders post types?
Products, yes: WooCommerce registers the product custom post type. Orders, no longer on new stores: since WooCommerce 8.2 (October 2023), High-Performance Order Storage is on by default for new installations, so orders live in dedicated database tables instead of the shop_order post type.