Support » Fixing WordPress » Custom Taxonomies Not Working in WP 3.1

  • Hi all,
    I just installed WP 3.1 and I notices all of my custom taxonomies no longer function. Has something changed here that I wasn’t aware of? Everything was fully functional pre-3.1 up to 3.0.5. Here is how I am registering them…

    `[Code moderated as per the Forum Rules. Please use the pastebin]

Viewing 10 replies - 1 through 10 (of 10 total)
  • Same thing is happening to me.

    I have just upgraded to WP 3.1 and my custom taxonomies are no longer behaving correctly.

    1. When I go to click on my custom taxonomy in the admin, I receive the WP ‘Cheatin’ uh?’ Error.

    2. My WPQuery no longer filters to specific taxonomy slugs.

    Registering my custom taxonomy like so:

    add_action( 'init', 'build_taxonomies', 0 );
     function build_taxonomies() {
    	        'hierarchical' => true,
    	        'label' => 'Product Category',
    			'public' => true

    Have been calling my query like so:

    <?php $args = array( 'post_type' => 'products', 'posts_per_page' => 10, 'taxonomy' => 'private-label' ); ?>
    				<?php $loop = new WP_Query( $args ); ?>
    				<?php while ( $loop->have_posts() ) : $loop->the_post(); ?>


    Anybody have any ideas what’s different about the way WP 3.1 handles custom taxonomies?

    Well, this has got a little more interesting…if I register a post type as follows 3.1 does not show the custom taxonomies…BUT if I just change the name of the registered custom post type it works. Some names seem to work and others fail completely. This seems like a bug unless the name of a custom post type is severely limited by a list that I don’t know…If anyone has any ideas I would love to hear.

    I have created a new blank theme (just style.css, index.php and functions.php) to test the custom taxonomy…

    [Code moderated as per the Forum Rules. Please use the pastebin]

    In the previous post all that was changed was this line…

    register_post_type('eTickets', $args);

    UPDATE: It seems you can’t use any capital letters in a custom taxonomy name…just be aware…

    Thanks for the capital letter tip!

    Changing my taxonomy name to be lowercase both of my issues.

    Unfortunately though, in changing the original taxonomy name, it broke my nav_menu set up that was using the same taxonomy, giving me this error:
    Catchable fatal error: Object of class WP_Error could not be converted to string in /home/---/---/wp-includes/formatting.php on line 445

    Have investigated: this is a bug. Apparently it happens any time you change your custom taxonomy name. Some people had success deleting certain things in phpmyadmin. I decided to a fresh install.

    Now everything is back to normal (minus some content that I now need to re-enter) and working perfectly.

    Good luck!

    Glad to hear that worked out. I tried to enter a ticket into the bug tracking but they deleted it. I am sure it is somewhere in the codex but it wasn’t at all clear at first.

    Just a note – I just discovered that it also cannot contain any spaces!

    This thread just saved me a lot a of pain when I ran into that error – thanks!


    Yes, thanks a lot for sharing. Saved me some trouble.

    Although the “Cheatin’ huh” error was cute and made me smile, it really was less than helpful as an error message.

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Custom Taxonomies Not Working in WP 3.1’ is closed to new replies.