In the backend, how can I restrict the editors (user with editor role) from viewing/editing pages created by admin (and/or by administrator role)?
I know that the editor role in WordPress have “edit_others_pages” capability, but I need a function for a custom capability like: “edit_others_pages_except_admin” 🙂
I don’t want to use a huge/complicated plugin just for that!
Thanks! I searched for a solution more then 1h 😀
This code will do the job…
For a detailed explanation Read Here.