0

I have a Wordpress site with custom roles (except for administrator) and now wanted to create a role so that a user with this role can be manually assigned as the author of a post. I thus created a role which had all permissions checked in the "post" submenu, but none in the others (since this role is only there for this reason). A user that has this role assigned can now however still not be chosen as the author of a post, but only the ones with an administrator role. My question therefore is:

What permissions does a role need so that the user can be assigned as the author of a post? I would really like to not make this user an administrator

  • You can try wordpress' default editor role – Vishwa Mar 29 at 15:40
  • Thank you for the suggestion; I have custom roles and cannot find the standard roles anymore, so I cannot asign the default editor role sadly – Yato Apr 1 at 13:37
0

You probably need to add 3 capabilities:

  • edit_published_posts
  • publish_posts
  • delete_published_posts

but at the very least, you need to add publish_posts as that is the capability WordPress uses to determine what users are shown in Authors drop-down.

Note: Changing capabilities is stored in the database so the recommendation is to modify these values via a plugin and only when the plugin is activated or deactivated rather than on every request.

  • Thank you for your answer. I have granted the role all rights in the posts tab, that means including the three you listed here (plus that was three days ago so any eventual system delays should be over). The user however still does not appear in the author-dropdown of a post. Any idea if there are more permissions in other tabs to grant, for instance in the "general" tab? – Yato Apr 1 at 13:34
  • It sounds like you are using some sort of plugin to manage permissions. If that's the case, it makes answering this question more difficult as there could be any number of issues behind the failure to include the user in the Authors dropdown. What plugin are you using, if any? What happens if you grant all rights to a user. Do they show up then? Have you tried taking a user with more permissions and removing them one by one until the user disappears from the dropdown? – Ted Stresen-Reuter Apr 1 at 17:04
  • You are right, there is a plugin for that (I have not built the site but only recently became an administrator, so I did not know about it); it is called "Members" by Justin Tadlock. Does that help you? I did a quick search on it and could not find anything about my issue. I have tried granting and taking roles, but not permissions yet due to the fact that there are about 60 individual permissions. I will do so ho wever if there is no other fix to this. The administrator role is the only one that works – Yato Apr 1 at 17:47
  • By default using that plugin, Authors have the following capabilities: General: Read; Posts: Edit posts, Publish posts, Read, Delete posts, Delete published posts, Edit published posts; Pages: Read; Media: Upload files. If you create a new role and give it those same capabilities and then assign users to that role and they still don't show up in the dropdown, there is something else at play (wp_dropdown_users filter looks like a likely candidate for interfering). Try creating a role with those caps, assign to a user, and report back what happens. – Ted Stresen-Reuter Apr 1 at 23:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.