Aug 12 2010

The Problem with WordPress Custom Post Types

Posted by: Jason Ferguson

Xzibit Moddin My WordPress!

A lot of “names” in wordpress on the net are politely bashing people because they are trying to use Custom Post Types in the wrong way, but really in my (and clearly a lot of other users) opinions, what they are trying to do is what should be defaultly working in the first place.

Custom post types should be exactly that, custom post types. It should give me the ability to define a custom submission area with specific meta content completely separated from the normal “Submit New Post” area. If you have ever built something for a client, and not just for personal use, you would see how extremely useful this would be. But what we have now with this new feature isn’t custom “post” types like it’s named, it’s actually custom “content” types.

Right now we are stuck with using custom fields and trying to explain to clients in explicitly detailed instructions how to properly define key pairs for specific post types that all still need to be displayed inline with the regular “blog”. Why is it so hard for people to understand that being able to use custom post types as an ability to specifically define certain REAL post submission meta boxes and separate them out in the dashboard is a useful thing.

Part of the current version of custom post types works perfectly for this, the functionality is all there clearly. The problem is it not only separates these post types in the dashboard, but removes them as “posts” completely and aren’t included in the standard loop, taxonomy, or outputted in the default rss feed period without some somewhat serious coding and work arounds. If your using a plugin or theme that makes use of this feature to create custom posts, and then disable it, you completely lose the ability to natively view the custom posts you have submitted. Yet there they are still sitting in the database.

I’ve seen a lot of different people responding to Custom Post type questions trying to be used in this regard in a similar way, parroting each other, ie “Separation in the admin panel is not a good reason to create a whole new “type”. Not if what you really need is to separate existing posts by some other factor. That’s what taxonomies are explicitly designed for.”

And in that context, yes I absolutely agree, if you just need to separate the posts out for a specific taxonomy your much better just sticking with the amazing new taxonomy improvements introduced with WordPress 3.0. But more and more often it seems like people don’t understand the problem being described in the first place. It isn’t about taxonomies like everyone is jumping over each other to point out, it’s about having true custom post types that work inline with normal existing posts.


If I have a post category in a clients site called “Useful Applications” and another called “Quotes” with specific meta submission requirements that I want to be able to display inline with normal posts and not completely separated, then I should be able to display specific meta submission options for those types, almost exactly how the custom post feature works now. (ie: For Quotes I might want to only show a Quote Author and actual quote field. If I have a custom taxonomy for those type of posts, I only want to show that taxonomy for those posts.)

What I don’t want is to have a generic “Submit New Post” page filled with irrelevant meta fields and taxonomy options in order to cover each post types needs. Or just as worse, using custom fields on that same global submission page and trying to explain to the client (who has just enough technical ability to check his email) how to actually use it.

The new Custom post type features works perfectly for this, but the inability to treat these the same way we do normal posts is mind boggling. If I want to “opt out” and have my custom post type be absolutely separated from normal posts, with a completely separate taxonomy and excluded from the normal loop entirely or on case by case basis, then I should have that ability. But that should be an opt out, not the default settings.

WordPress hasn’t done anything in pretty much as long as I’ve been using it that remotely aggravated and disappointed me as much as this. I’m not saying I don’t see a use for the way custom post types currently work, because I absolutely do, but I definitely think the ball was dropped and an extremely useful ability for it was forgotten.


From where I’m standing there is just a big difference in how easy it is to create a custom post type compared to the wordpress knowledge it takes to write a custom write panel. For reference, check out;

Compared to:

Creating a new post type in order to have a specific, separated write panel is only overkill because of the way they implemented custom post types in the first place, which is something a lot of people are blogging incorrectly about by describing these new functions as a way to build tumbler-esque themes with customized wordpress write panels.

The current method of creating a basic write panel for a regular post is pretty rough compared to how incredibly easy the custom post types method is. Again, I’m not saying I don’t see a use for the way custom posts are implemented, because I definitely do, but there is still a huge difference in what’s required to be able to create these write panels for real posts within the normal wordpress loop, which is exactly the reason so many people are incorrectly trying to use custom post types and getting so frustrated with it in the first place.

There is a lot of incorrect blogging right now about how Custom Post Types can be used. For more information on what Custom Post Types actually are and what they are not, I highly suggest the following posts:

WordPress 3.0 and Custom Post Types @Ottopress.com
Custom Post Types in WordPress @Justinadlock.com

I highly recommend reading through them and checking out the commented responses, there’s also some good information about the limits of Custom Post Types in the comments of a pretty great post by Richard Sheperd titled “Create your first WordPress Custom Post Type“.