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.

how are you ?

I have in my site (post_type called = books)..

I need to make some users for example (Library) to create a books (post_type = books) ..

this is the code to add rols (called = library) ..

$library = add_role('library', 'library', array(
    'read' => true, 
    'edit_posts' => true,
    'delete_posts' => false, 
));

The library Role can create (any type of post) , I want it to create books (post_type) ..

I wish you understand me ..

thank you very much ^_^

share|improve this question
    
@hakre thank you very much. I have problem with the dots because I'm using dots in my language and no problem with using. But I this in English is big problem. The two dots mean end of sentenece.I will don't using again in next time. –  AboSami Dec 26 '10 at 16:05
    
@hakre I will write the question by change it. In my website I added a new post type. it is books(by using register post type function). afterthat , I need type or role for user. There are some of types (Super Admin , Administrator , Editor , Author ,Contributor and Subscriber). I need to add new role or new type ( for example: Employers). I want to give this type(employers) some roles like: write books , not post or page. just books(books: new type post). BUT HOW? If you can't understand to me. I will change again. Thanks hakre ^_^ –  AboSami Dec 26 '10 at 16:29

1 Answer 1

up vote 0 down vote accepted

You can add your own capabilities for custom post types. The default behvaiour for a post type is to inherit capabilities from the default post post-type.

See the capabilities parameter in register_post_type (Wordpress Codex), that has more information about how that can be done.

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.