Only view/edit/delete CPT made by users with the same role

Question

I have created a custom post type (CPT) called “books” where users will be able to exchange “bookid” and “bookinfo” (as ACF).

I have created user roles such as Countries and cities (France> Paris, France>Marseille)

I am looking to find a way that a user who has the user role Paris can only “view/edit/delete” the books from all users from same user role (Paris)

I am also looking to find a way that a user who has the user role France will be able to “view/edit/delete” the books from all sub user roles such as Paris and Marseille.

I hope my idea is quite clear…
I havent found any plugin who could do that or any function after hours of research online.
any idea ?

0
, , Elie 4 months 0 Answers 53 views 0

Leave an answer