Cheatin’ uh? Error – WordPress Custom Post Types

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

17 Comments → “Cheatin’ uh? Error – WordPress Custom Post Types”


  1. Ryan

    1 year ago

    Thank you sir for this. Had a few WTF moments over this.

    Reply

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

    Reply

  3. 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.

    Reply

  4. T.M

    1 year ago

    Thank you so much! They could output a error message or through a error when Uppercases.

    Reply

  5. Matthew

    1 year ago

    Thank you!

    Reply

  6. Diego

    12 months ago

    Really thank you! You save my day.
    Everything was wrong because of that mistake.

    Reply
  7. [...] encontrada originalmente en 48Web Leave a [...]

    Reply

  8. Tim

    10 months ago

    Thanks a lot! Indeed did save me a few hours hunt down the wordpress rabbit hole.

    Tim

    Reply

  9. mr k

    9 months ago

    ta

    Reply

  10. Friend

    8 months ago

    Thanks for posting this. Now why on earth would any developer use such an uninformative error message?

    Reply

    • abrudtkuhl

      8 months ago

      It's the worst error message EVER! <p style=”color: #A0A0A8;”>

      Reply

  11. @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!

    Reply

    • 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;”>

      Reply

  12. 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.

    Reply

    • abrudtkuhl

      5 months ago

      Great point George <p style=”color: #A0A0A8;”>

      Reply

      • Delly

        5 months ago

        A really good answer, full of rtaionaltiy!

        Reply

Leave a Reply

Want to work with us?

Do you need help with WordPress? Get in touch right away. We can't wait to work with you. Call us at (515) 966-4848 or email Andy.

Recent Posts

Follow Along