Why I Don’t Use Custom Post Types

I have tried to stay away from Custom Post Types (not a post or a page, but another type of “post” in WordPress) in case I change themes or plugins and they’re no longer compatible or friendly or just don’t work the way I want them to. On researching Jetpack’s Publicize yesterday, I found a note that the folks at Jetpack aren’t planning on making Publicize compatible with custom post types. Well, that does it, I’m going to try even harder to not use custom post types if even the folks at WordPress aren’t planning on making the most basic plugin compatible with it.

Custom Post Type Code

So why would they do that? Remember, I can spell PHP, but I’m not a programmer, but as I see it, there are posts, pages, categories, tags, etc., but when you add custom post types into the mix, it’s a bit of an entirely new beast. Sure, it still might have a title, a body, and a category, but it’s no longer, say, apples and oranges, it’s not even really a fruit, it’s a vegetable. It’s another type of post type.

I’d like my content to be “future proof.”

Here’s another example. As much as I like the Portfolio function on Canvas, I don’t use it because I don’t want those entries to not be posts. Why not? What if I change themes? I’d have to convert those “Portfolio Custom Post Types” back into posts or into some other post type from the new theme. And now I learn that every new portfolio piece I posted wouldn’t go out with my Jetpack Publicize settings. Maybe I’d have to do it manually or something. Yeah, manually, that’s not going to happen.

Furthermore, I want my site to be sortable, rate-able, star-able, measurable, and all in the same pool of post types (e.g. just posts). That also makes it more future proof: it’ll work with other themes and be readable, feed-able, and compatible.

Does that limit what I can do with posts? I guess so. So if there were a compelling reason to use them (e.g. for ONLY, say, events or hotel reservations), then great. But anything that might be a post that I might want to have archived together with other content on the site, I’m going to try to keep it a post. So for example, as I mentioned, I really do like that Portfolio function in Canvas, so I tried to re-create it over at WordPress U. No, it doesn’t have the fancy AJAX function, but at least it shows a grid of posts with thumbnails and titles. I could probably make it AJAX if I tried a little harder, but I mostly wanted to see if I could convert what they were using as custom post types into a regular post. I did it. I’ll take it.

Working to recreate the Canvas Portfolio function without using a custom post type.

Working to recreate the Canvas Portfolio function without using a custom post type.

, , ,

7 Responses to Why I Don’t Use Custom Post Types

  1. tim January 8, 2013 at 10:27 am #

    “future proof”. That should be everyone’s montras. Nothing i hate more than breaking a site after updating it or changing themes
    tim recently posted … Traci Ruble MFT

    • Mirza February 17, 2013 at 2:09 am #

      Actually I had quite often that I just updated a website to a new WordPress release and that I just saw php errors coming to the screen.
      There is never a way to revert it back to an older version or whatsoever. Latest time this happened was because WordPress became more strict on possible mysql injections… So if you know something should be coded in a certain way,,, start as early as possible, just to avoid stressed customers mailing to you…
      Mirza recently posted … Aambeien

  2. Per Eric Jansson January 11, 2013 at 7:53 am #

    Thanks for that info!

    Actually I asked the woo guys already how to show a portfolio-item among the regular posts. They said it is not possible. But they are in the same db table with similar structure so I thought I can make it show anyway – but your point is very good: What about the future, and what about Jetpack?

    The right way to go about it, would then be add the gallery functionality to the regular post, under certain conditions, and let it have a fallback on something more simple if the extra functionality is not present… Anyway, that is not for now.

    • Bradley Charbonneau January 11, 2013 at 7:56 am #

      I wanted the look/layout of the Portfolio for my WordPress U, but I didn’t want to use the portfolio items. It took some time, but I managed to almost get there with regular posts in a Portfolio-style layout on WordPress U Basics.

      But about the gallery functionality, I have to say, I don’t love the WOO Canvas single item portfolio gallery so much. Works well with horizontal images, but less well with taller ones. In that case, I’d rather use WP’s built-in gallery.

  3. Sander February 15, 2013 at 2:09 am #

    Actually I like the custom post types very much, but it’s hard to create plugins future proof in WP anyway, because sometimes they decide to mix everything up anyway…

    • Bradley Charbonneau February 15, 2013 at 2:52 am #

      I agree, Sander–they’re great and powerful, but it’s just hard to keep them working over time unless you do even more work to make it all fit together.

Trackbacks/Pingbacks

  1. Jetpack 2.8 - February 13, 2014

    […] I’m sometimes weary of using Custom Post Types, this is yet another reason they can be a good–and […]

Leave a Reply


+ six = 15

CommentLuv badge

css.php