Opened 14 years ago
Closed 14 years ago
#14649 closed defect (bug) (duplicate)
Throw error when registering a Post Type longer than 20 chars
Reported by: | batmoo | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | |
Component: | Posts, Post Types | Keywords: | |
Focuses: | Cc: |
Description
From stephdau's blog post:
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).
WordPress should throw either a PHP Notice or an admin_notices error warning that the post type name cannot be longer than 20 characters and fail to register the post type.
Also applies to register_post_status.
Change History (4)
Note: See
TracTickets for help on using
tickets.
Are you adding the post type via the admin UI? If so, please provide the URL of the page in Admin where you do this.
Even better please provide some simple steps on how to reproduce the problem.