Custom Post Type Resources

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

Custom post types in WordPress

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.

Custom Post Types by WP Engineer

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.

WordPress Codex for Custom Post Types

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.

How to create a Meta Box

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.

Custom Taxonomies

A Refresher on Custom Taxonomies

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.

In Depth Explanation of 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.

Other Resources

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

Simple Custom Post Type Archives

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.

Convert Post Types

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.

Custom Post Type UI

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

Quality Control

A free innovative theme using custom post types to manage bug reports.

Calendar Press

Uses custom post types to create events. Allows you to set a start and end time, location and address.

Estate

Estate is a real estate theme by Woo Themes (affiliate link) that uses custom post types for property listings.

Portfolio Theme

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.

WP E-Commerce

The WP-Ecommerce Plugin is scheduled to use custom post types in their next release.

WP Bids

WP Bids uses a custom post type to generate client proposals and job estimates.

TBTestimonials

Manage your client testimonials with Custom Post Types. There’s even a spiffy widget.

Rotary

A free theme with a slider for custom post type images.

CPT – Speakers

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.

About Devin

I am a developer based in Austin, Texas. I run a little theme shop called DevPress and help manage a WooCommerce shop with Universal Yums. Find me on twitter @devinsays.

14 Responses

  1. Matth

    I notice there’s a similar plug-in out there called WP Post Type UI which is “Inspired by “Custom Post Type UI.”

    I’m concerned with getting a mix of plug-ins that don’t clash with one another. Clearly I’ll want one solution to add the custom post type, and another one to display the post types in a group. I guess I’ll do some trial-and-error and see what works…

  2. Matth

    Wow, Paul, thanks for the tip!
    I’m currently using a combination of Custom Post Type UI (to make the post types) and Verve Meta Boxes (to make meta boxes.)

    EPT will do both with one plugin. I just watched the videos, (somebody give that man a microphone!) and noticed EPT wll also let you easily customize the edit fields in the admin interface!!! That saves me a lot of custom code replacing when I want to switch templates.

    The only non-ideal thing is there’s no standard wordpress syntax on the database fields to call them in your templates. So if a new plug in comes out, that you like better – like in this case, it’s back to the template to update all the custom field displays. Not a super big deal in the grand scheme OT.

    WordPress 3 has come a long way in less than a month. This post and discussion thread is the most valuable resource I’ve found for CPTs. Thanks Devin, and Paul, and all commenters past and future :)

  3. just to reply to Matth, on the particular site I’m working on now, the EasyPostTypes plugin is throzing a Fatal Error, and there doesn’t seem to be free support available , so use it with caution.

  4. Matth

    Oh Yikes, I just messed around with EPT and discovered there’s no way to create Taxonomies within EPT, unlike WP Post Type UI, or Custom Post Type UI. That seems like a pretty essential feature.

    So as of today, July 14, there’s no single plug in to manage Post Types, Taxonomies, and Meta Boxes. I suspect that will change in the coming months. Exciting times for WP!

  5. paul

    the error I was having with EPT was actually due to the wrong version of PHP on the server, so apologies for that. The plugin was not at fault
    I now use “custom field template” plugin for the meta boxes (not a big fan of the UI) but it gets the job done and GD txonomy and custom post tools

Leave a Reply