Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I am using Justin Tadlock's Members plugin 0.2.4.

I have a custom user role "Author" that I am granting permission to post a Custom Post Type "blogpost". The Author can post and edit the CPT blogpost however cannot add categories as the check-boxes are grayed out.

Others have reported similar problems in his plugin's support forum over a year ago but the the user's question seems unanswered and is now closed.

I am aware that enabling the "edit_posts" capability fixes the problem however gives the custom user role access to all post types which they should not have and is very bad.

Some have tried creating custom taxonomies to work around this, which reportedly worked for their custom user role. However, that does not work for my site as I have built it primarily using the default taxonomy provided in the core and I am quite far along in development.

Any help explaining to me what I have done wrong, or how to better configure Justin Tadlock's Members plugin would be very greatly appreciated.

Thank you.

share|improve this question

1 Answer 1

Maybe the name of your CPT needs to be changed

blogpost

You could also add taxonomy type support

add_action( 'init', 'add_type_taxonomy' );
function add_type_taxonomy() {

register_taxonomy( 'cpt-type', 'cpt',
    array(
        'labels' => array(
            'name'          => _x( 'Types', 'taxonomy general name', 'theme' ),
            'add_new_item'  => __( 'Add New CPT Type', 'theme' ),
            'new_item_name' => __( 'New CPT Type', 'theme' ),
        ),
        'exclude_from_search' => true,
        'has_archive'         => true,
        'hierarchical'        => true,
        'rewrite'             => array( 'slug' => 'cpt-type', 'with_front' => false ),
        'show_ui'             => true,
        'show_tagcloud'       => false,
    )
);

}

Replace all instances of cpt and CPT with the name of your Custom Post Type.

You would also change this line of code in your code which registers your CPT:

'taxonomies'   => array( 'category' ),

With this line if you want taxonomies instead of categories

'taxonomies'   => array( 'cpt-type' ),

Where cpt is the name of your custom post type

share|improve this answer
    
Hi, Thanks! Will taxonomy type support use the existing taxonomy or create a new custom taxonomy? –  user2591811 Feb 13 at 2:42
    
It will add a new page for creating unlimited taxonomies. –  Brad Dalton Feb 13 at 3:31
    
I just need the category taxonomy that I have. New ones won't appear anywhere in my site, I have not developed it for that. I am trying to figure out how to let users access the default category taxonomy for the CPT that their user role gives them. –  user2591811 Feb 13 at 4:00
    
Updated my answer –  Brad Dalton Feb 13 at 4:11

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.