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.