The ability to create custom post types was a great feature added in WordPress 2.9 and then expanded in 3.0. It allows us to create completely different types of content than the standard “Pages” and “Posts” we’re all used to.
To get started with custom post types, here’s my recommended list of links and resources:
General Overview of Custom Post Types
Justin Tadlock has the best all around reference guide for building custom post types. This article has several code snippets and in-depth explanations of how to build custom post types, add taxomonies, and display the posts on your site. There’s also a follow-up article explaining how to display the custom post types on your home page.
WP Engineer does really solid posts about new WordPress features. This one has a list of the arguments you might need when setting up a custom post type array.
The WordPress codex has basic reference for custom post types.
Adding Meta Boxes to Custom Post Types
When you create a custom post type, you are able to specify which metaboxes are available on the edit screen. The metaboxes generally included with the post are title, content, excerpt, and custom fields.
But if you’re using the post types in new or interesting way, you’ll likely need more custom metaboxes. For instance, if you were making a real estate web site, you’d probably want the “Properties” custom post type to have boxes for entering the address, list price, amount of bedrooms, etc. To add these, you’ll need to create new custom meta boxes.
There’s several tutorials out there for creating custom meta boxes, and most of them will work for custom post types- even if it was written before WordPress 3.0 came out. I wrote this tutorial for adding metaboxes to custom post types based on a post by Deluxe Blog Tips.
You won’t be using custom post types for long before you realize there needs to be a way to organize them. Pages and posts currently use categories and tags as taxonomies- but if you were making a post type called “Movies”, it might make sense to build a taxonomy for “Actors” to tag your posts in. This article by Justin Tadlock has code examples and explanations for using taxonomies.
If you still don’t quite understand what taxonomies are, I’d recommend checking out this article by Michael Fields. There’s also an entertaining screencast that explains what a taxonomy is and how you might use one.
Voosh Themes has a terrific tutorial for creating a professional portfolio using custom post types.
Replace the standard tack icon for custom post types with slick icons ‘specially made for that purpose.
Plug-Ins for Managing Custom Post Types
One problem with custom post types is a lack of templates. Out of the box, WordPress only has support for single-customposttype.php. If you have archives, or want a multiple listing, you’ll need to build the template redirects in or use a page template. Jake Goldman built a plug-in to handle this issue. Michael Fields wrote an article and code snippet to address it. And Matt Weibe has a plugin that’s not in the repository, but also handles the issues of redirects.
Perhaps you have a lot of posts on your site, let’s say for a portfolio, that you now want to convert into a custom post type. Rather than copying everything over by hand, you could use this handy plug-in. It’s also hosted in the WordPress repository.
If you’re unfamiliar with PHP code, you can still add custom post types to your site. Brad Williams of WebDevStudios made a nice user interface that allows you to set up the custom post types and define the taxonomies, all from the comfort of your WordPress dashboard.
Themes and Plugins That Use Custom Post Types
A free innovative theme using custom post types to manage bug reports.
Uses custom post types to create events. Allows you to set a start and end time, location and address.
Portfolio Theme is a free GPL theme that I released. You can add various images to your portfolio post type to display them on your site. It’s excellent for artists or web designers. Feel free to look at the code and use it for your own projects.
The WP-Ecommerce Plugin is scheduled to use custom post types in their next release.
WP Bids uses a custom post type to generate client proposals and job estimates.
Manage your client testimonials with Custom Post Types. There’s even a spiffy widget.
A free theme with a slider for custom post type images.
This plugin creates a custom post type for event speakers. Includes speakers page and single-speakers page templates.
Add Your Own Links
There’s still a lot of work being developed for custom post types. If you notice a new tutorial, theme or plugin that I haven’t mentioned, please add it to the comments so I can put it in the post.