I believe that I’m experiencing the same issue. Here’s what I’ve done.
- I registered a custom post type called Business.
- I created a custom role called Business Manager.
- I assigned the following capabilities to the Business Manager role: edit_business, publish_business, and delete_business.
- I removed the following capabilities from the Business Manager role: edit_post, delete_post, and publish_post. (I did this, because I only want Business Managers to interact with the Business CPT.)
- I created a user, and assigned the Business Manager role to the user.
- I created a Business post with the Admin ID.
- I attempted to edit the Business post, and designate the author as the Business Manager WordPress user.
- The Business Manager WordPress user was unavailable for selection as the post author. I could not make the Business Manager user the author of the Business post.
It’s possible that this is a WordPress issue, but I’m not sure. Alternatively, it could be a feature of the paid plugin version, or a bug. I’ve read through several WordPress docs, and I don’t understand the behavior.
Until WordPress 5.9 you had to grant to your custom author role the level_0, level_1 capabilities. Revoke it from user, update his profile and grant it back to this user. After that only user will appear in the authors list.
Starting from WP 5.9 user should can edit post for which you try to set him as author. At least edit_published_post capability is required for the post in the published state.
One of the solutions above of the both at the same time should help.
Read this article
https://www.role-editor.com/wordpress-user-levels-deprecated-just-partially/
for more information.
Thank you @shinephp!
That was very helpful. WordPress enabled the level_0 cabability by default. My project is using WordPress 6.2.2, so I first tried your second suggestion. That didn’t work, so I added the deprecated level_1 capability to the role, and that let me change the post author to the Business Manager.
My intent is that the Business Manager user will be able to edit their business, publish changes to their business, and delete their business. I want to restrict them from creating new businesses.
In User Role Editor, I tried removing the publish_businesses capability. That had a negative consequence of preventing the Business Manager from publishing changes to their post. Is this something I can do in the paid version, or am I trying to achieve something that is not possible? Thank you again. I’m grateful for your time!
WordPress uses ‘edit_’ capability by default in both cases: for editing existing post and for adding new one. Pro version allows to use a separate ‘create_’ capability to protect “Add New” function.
Btw., it’s better to ask questions related to Pro version directly via email or related site contact form. This forum is dedicated to a free version only.
Sounds good. Thank you. 🙂