Are you sure you want to do this? Please try again. WordPress 3.0 custom post type error.

Sorry for the longest title in the history of my blog, I just want other developers to find my site and find the info they need to.  I found out that wordpress custom post types can throw back an error if the name is more than 20 characters.

Here's an example of what NOT to do.

add_action( 'init', 'create_my_post_types17' );

function create_my_post_types17() {
register_post_type( 'company_block_middle_post',
'labels' => array(
'name' => __( 'Company Middle'),
'singular_name' => __( 'Company Middle' )
'public' => true,

The error I kept running into was "Are you sure you want to do this? Please try again." when I tried to publish a new custom post. I spent about an hour tweaking my database settings, overwriting old admin files and trying different combinations of numbers and names for my custom post until I broke down and searched Google for an answer.

Thanks to this post , , I figured it out and changed the name from "company_block_middle_post" to a much shorter "cmpny_middle".


I'm back in business and now everything is running smooth. Other than that little snag I love everything about WordPress 3.0 and custom content/post types.

This entry was posted in Wordpress. Bookmark the permalink.
  • knightnet

    Glad you found this useful Will. Thanks for the link.

    • William Waldon

      It was very useful. Thank you for the great tip.

  • Juan López

    I am surprised this answer did not come up first on my Google search.

    It was in fact the issue with my site.