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.

Im just wondering if its possible to create user role that allows to write/edit custom post type for example: Consultants, but not allow to write normal posts (used for as news for example).

I know that if user wants to edit posts its a must to have edit_post enabled for him. Question is if i can create something like: edit_[custom_post_type] or something?

Thanks in avance if anyone can help me with this issue...

Kindest regards

share|improve this question

2 Answers 2

up vote 1 down vote accepted

I suspect that Justin Tadlock's Members Plugin would make this very easy for you.

share|improve this answer
    
Yes was about to write this. That figures out all my problems :D. Thanks anyway! –  kroma Jun 13 '11 at 13:24

When you register your custom post type, explicitly set the capability type;

register_post_type( 'my_type',  array(
    'capability_type' => 'my_type',
    // other args
) );

Now by default, only super admins should be able to add/edit/delete them, until you grant other roles the relevant capabilities (for example, as @tnorthcutt suggested, using the Members Plugin).

[edit_post] => edit_my_type
[read_post] => read_my_type
[delete_post] => delete_my_type
[edit_posts] => edit_my_type
[edit_others_posts] => edit_others_my_type
[publish_posts] => publish_my_type
[read_private_posts] => read_private_my_type
share|improve this answer

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.