Cheatin’ uh? Error - WordPress Custom Post Types

April 4, 2011

development wordpress

This is for those of you hunting for the Cheatin' uh? WordPress error when developing custom post types.

It's most likely an issue with what you named a custom taxonomy that you intend to attach to a custom post type.

In our case we had...

register_taxonomy("Types", array("portfolio"), array("hierarchical" => true,
    "label" => "Types", 
    "singular_label" => "Type", 
    "rewrite" => true));

This is a frustrating error because you simply get the "Cheatin uh?" message. Here's the fix

register_taxonomy("types", array("portfolio"), array("hierarchical" => true, "label" => "Types", "singular_label" => "Type", "rewrite" => true));

Notice the difference? The fix is your custom taxonomy's name has to be lower case. That should save you a couple hour hunt down a rabbit hole.

Subscribe to my mailing list