Custom Post Type
A developer-defined content type that extends WordPress beyond posts and pages, enabling structured data like products, portfolios, or events.
WordPress ships with two built-in content types: posts and pages. Custom Post Types (CPTs) let you create entirely new content types — products, testimonials, case studies, events, whatever your business needs. Think of them as custom filing cabinets in your WordPress admin, each designed to hold a specific kind of content with its own fields, templates, and URL structure.
How It Works
You register a Custom Post Type using the register_post_type() function, typically in your theme’s functions.php or a custom plugin. Here’s a stripped-down example that creates a “Portfolio” post type: