Can I make user role that can only access a certian content type?
-
16-10-2019 - |
Question
I would like make a custom role that can only access a custom content type that I'm going to be creating in the admin. Is that possible and does any know of any examples or tutorias that I should check out to get started?
Thanks, Paul
Solution
The register_post_type
has a capabilities
(or simple version: capability_type
) that you can use to specify a separate capability to create and edit posts of this type. If you set this, you can create a new role that has the capability to edit these custom posts, but not regular posts.
Licensed under: CC-BY-SA with attribution
Not affiliated with wordpress.stackexchange