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'm developing a Wordpress theme. In this theme, there are a few custom post types.

Custom Post Types :

  • book
  • article
  • event

We are using Wordpress' default user roles (we can create new roles, if necessary) .

Contributors just post new book and article . But they can't create event. Also they can't see, event menu item on wp-admin .

How can i do this ?

While registering new post type :

"map_meta_cap" => TRUE,
"capability_type" => "book",

And (on plugin activation)

$role = get_role( 'contributor' ); 

$role->add_cap( 'publish_books' );

But I think it's still not working. it's so complicated for me. I couldn't do it. I just want this roles and capabilities :

Administrator

Can see , post , publish everything

Contributors

Just can see, post to review book and article Can NOT see other post types on wp-admin menu.

share|improve this question

1 Answer 1

You can create capabilities for each custom post type and add this to the different roles; see this answer from an question here.

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.