Answer the question
In order to leave comments, you need to log in
How to allow users to edit each other's posts?
There is a custom post type - psvideo (Video). Now users with different roles can create their own entries and see that there are strangers. On the first screen - the page from the administrator role (everything except the entry "42" - his), on the 2nd - the page from the custom role of the manager (his entry - "42"). How to add the possibility of mutual editing of records?
Thank you.
Answer the question
In order to leave comments, you need to log in
if I'm not mistaken something like this
$public_roles = array( 'studio', 'producer' );
foreach ( $public_roles as $the_public_role ) {
$role = get_role( $the_public_role );
$role->add_cap( 'read_room' );
$role->add_cap( 'edit_room' );
$role->add_cap( 'edit_rooms' );
$role->add_cap( 'edit_published_rooms' );
$role->add_cap( 'publish_rooms' );
$role->add_cap( 'delete_published_rooms' );
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question