Hello, i've create a custom role that should have the capability to edit his own posts (created by an admin and related to him) but not creating new ones. So, an admin create a custom post, he set this to a user with the custom role, and that user can only edit that posts. How can I do that?
Hello and thank you for contacting the Toolset support.
WordPress has six pre-defined roles: Super Admin, Administrator, Editor, Author, Contributor, and Subscriber. Each role is allowed to perform a set of tasks called Capabilities. Read more about it here https://wordpress.org/support/article/roles-and-capabilities/#contributor
But WordPress does not have a "Create post" capability, instead, it uses the "Publish post" capability. For example, the Contributor role can create new posts, but can't publish them. If you want to restrict the creation of posts for this role, you will need to implement it using custom code.
I run a small test where I created a custom post type(Classes) and a custom role(Teacher), teachers can create new Classes posts, but they cannot publish them. You can check it by logging(as an admin) in with the following URL hidden link
I created a teacher user that holds the following credentials: john / john@123123
I'll let you check this test installation while it is always active, it will expire in 7 days.
I hope this helps. Let me know if you have any questions.