When I first heard about custom post types (CPTs) less than a year ago when I was introduced to WordPress 3.0 (even though they've been around since 2005), I thought that custom post types would change, revolutionize WordPress making it more than a blogging platform, more than a content management system (CMS). And it has and will continue to change how web WordPress developers develop, if they haven't already. However, it took me longer to understand custom post types than I had expected, primarily because of my lack of proximity and "need" for them. Yet my lack of "need" for them was because I learned how to highjack categories to make WordPress do what I wanted. However, my lack of need for them was only driven by my lack of understanding them. Instead of "hacking" or manipulating categories or tags to do the leg work, custom post types can do the customized work for you, quickly, easily, and simply.
What are Custom Post Types NOT?
Custom post types are not just "blog posts" in the traditional sense for "post" is one post type. They are not a replacement for custom fields for custom post types work in tandem with custom fields. They are not taxonomies for custom post types are associated with taxonomies and vice versa. Creating custom post types are not completely GUI (Graphical User Interface) driven innately (or out of the box) in WordPress. However, with some premium plugins like Easy Content Types and GD Custom Posts And Taxonomies Tools as well as some "free" plugins like Custom Post Types UI Plugin and WP Easy Post Types, custom post types graphical user interfacing has made great strides in what could easily be incorporated into WordPress core, if Automattic so choses to move towards a more GUI approach.
What ARE Custom Post Types?
First up, to clear some misconceptions, Custom Post Types should be really be called Custom Content Types. As Mark Jaquith aptly says (and even admits):
These [Custom Post Types] were poorly named. Think: Custom Content Types. That is, non-post content. Examples: employees, products, attachments, menu items, pages, pets. If you want it to show up in your site’s main RSS feed, then it’s probably not a custom post type.
Instead, custom post types are "content" types. A page is a post type. A post is a post type. They can be used to store information or data and/or administer, arrange or display different types of content on the site. WordPress uses various post types: pages, posts, revisions, attachments, and nav menus, of which custom post types stand along side.
- Posts: default content type for blog posts displayed in reverse sequential order by post time
- Pages: default content type for static pages which can use page templates and organized via hierarchical structure
- Attachments: default content type for images, etc
- Revisions: default content type for post, etc., revisions
- Nav Menus: default content type for the custom nav menu
- Custom Post Types (Custom Content Types): Can be whatever we want, define, and set, e.g., events, podcasts, movies, cars, etc.
Thinking "custom content types" when someone says "custom post types" avoids the confusion with WordPress's posts. Some custom post type examples include:
- Media (e.g., galleries, links, micro-blogs, movies, videos, podcasts, portfolios, music, etc.)
- People (e.g., authors, employees, movie stars, producers, etc.)
- Products (e.g., cars, computers, real estate/properties, recipes, books, etc.)
- Events (e.g., any sort that includes date, time, cost, location, directions, etc.)
- Places (e.g., locations, resorts, etc.)
- Online Store (e.g., retail, wholesale, etc.)
Simply it is or can be anything that can be better arranged that isn't a "post" or a "page." Just think about those things that we all too often thought, "There's got to be a better way to present this information than a page or a post!" Custom post types should be something custom. It should have a custom submission area with specific meta content (via custom meta boxes and custom fields). The submission area should look and feel different from a normal post or page submission area.
For more information stay tuned. Until then, consider these posts: