WordPress Custom Post Types Catch

When dealing with WordPress custom post types, be sure that the namespace/value you use as an identifier for your post_type is less then or equal to 20 characters. The DB column which holds the said value is a varchar(20).

That one got me spinning for a while. Major props to Thorsten for ultimately cluing me in. 🙂

Comments

5 responses to “WordPress Custom Post Types Catch”

  1. Mo Jangda Avatar

    Same thing applies to custom post statuses (though, they haven’t been fully implemented).

    WordPress should gently warn the user (an admin_notices error, perhaps) if the go beyond the 20-char limit, no?

    1. Stephane Daury Avatar

      That’s a very good point. I’ll submit a ticket / patch when I have some time if you don’t. 🙂

    1. Stephane Daury Avatar

      Look like it’s going to be taken care of in the 3.1 release cycle.

Leave a Reply to Mo Jangda Cancel reply

Your email address will not be published. Required fields are marked *