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.
Category : Blog &wordpress &wordpress development




Ryan
1 year ago
Thank you sir for this. Had a few WTF moments over this.
abrudtkuhl
1 year ago
Yes! That's why I posted it – it was quite puzzling that's why I titled the post so others could easily find it
Rutwick
1 year ago
Hi… I already have my custom taxonomy name, all in lowercase. I had set the custom posts capability type previously to posts, but then I needed to add meta capabilities hence I changed the capability_type to 'company' (thats my custom post) and mapped all the required capabilities. But now when I click on the Companies link in my dashboard, I get 'Cheatin' uh?' error. Any idea? I can post my custom post registration code here if you want.
T.M
1 year ago
Thank you so much! They could output a error message or through a error when Uppercases.
abrudtkuhl
1 year ago
I know it's such a lame error
Matthew
1 year ago
Thank you!
Diego
12 months ago
Really thank you! You save my day.
Everything was wrong because of that mistake.
WordPress Stress | Thanks Matt » Cheatin’ uh? Error en WordPress al crear Taxonomies personalizadas en un Custom Post Type
12 months ago
[...] encontrada originalmente en 48Web Leave a [...]
Tim
10 months ago
Thanks a lot! Indeed did save me a few hours hunt down the wordpress rabbit hole.
Tim
mr k
9 months ago
ta
Friend
8 months ago
Thanks for posting this. Now why on earth would any developer use such an uninformative error message?
abrudtkuhl
8 months ago
It's the worst error message EVER! <p style=”color: #A0A0A8;”>
@GimmeABoost
7 months ago
Thanks! Working on setting up a portfolio section for our company and we ran into the "Cheatin' uh?" message and were stumped. Thanks for clarifying. Works like a charm now!
abrudtkuhl
7 months ago
That's exactly why I posted this. Hopefully you didn't waste hours on it like myself. Thanks! <p style=”color: #A0A0A8;”>
George
5 months ago
And if you're using multiple words in your custom taxonomy name, be sure not to have spaces. Use a dash between, or you'll continue to get the error. Multiple words can be useful so you avoid clashes with future possible taxonomies.
abrudtkuhl
5 months ago
Great point George <p style=”color: #A0A0A8;”>
Delly
5 months ago
A really good answer, full of rtaionaltiy!