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. :)

5 thoughts on “WordPress Custom Post Types Catch

  1. 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?

    Like

Leave a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.