Custom Taxonomies Cababilities

Since 3.1 I’ve had an issue with custom taxonomies for a site. it seems that my user (admin level) can’t edit the taxonomies from any screen. I see them on under the custom post type and can see them when adding a new post to the custom post type. I can even add currently available taxonomies to the post but I can’t create new terms or access the custom taxonomy on it’s edit page. Below is my code to set up the taxonomy.

 <?php add_action( 'init', 'fvww_custom_taxonomies');

function fvww_custom_taxonomies() {

    $labels = array(
        'name'                  => __( 'River Classes', 'taxonomy general name' ),
        'singular_name'         => __( 'River Class', 'taxonomy singular name' ),
        'search_items'          => __( 'Search River Classes' ),
        'all_items'             => __( 'All River Classes' ),
        'parent_item'           => __( 'Parent Class' ),
        'parent_item_colon'     => __( 'Parent Class:' ),
        'edit_item'             => __( 'Edit River Class' ),
        'update_item'           => __( 'Update River Class' ),
        'add_new_item'          => __( 'Add New River Class' ),
        'new_item_name'         => __( 'New River Class' ),
        'menu_name'             => __( 'River Class' ),
    );

    register_taxonomy( 'Class', array( 'fvww-river-guide' ), array(
        'hierarchical'              => true, //operates like a category
        'labels'                    => $labels,
        'rewrite'                   => true,
        'public'                    => true,
        'show_ui'                   => true,
        )
    ); // ends class taxonomy

} /* end function */ ?>

If I click on the ‘Class’ taxonomy under River Guides I get the ‘Cheatin uh?’ message from wp-admin/edit-tags.php line 12.

Related posts

Leave a Reply

1 comment

  1. Hi @curtismchale:

    Try 'river-class' instead of 'Class', i.e.:

     register_taxonomy( 'river-class', array( 'fvww-river-guide' ), array(
        'hierarchical'              => true, //operates like a category
        'labels'                    => $labels,
        'rewrite'                   => true,
        'public'                    => true,
        'show_ui'                   => true,
        )
    ); // ends class taxonomy
    

    Actually what caused you to stumble was your choice of a capitalized taxonomy name (i.e. “Class” vs. “class”) although I’d really recommend against such a generic name as “class” to avoid potential conflict which is why I suggested “river-class” instead.