最新消息:Welcome to the puzzle paradise for programmers! Here, a well-designed puzzle awaits you. From code logic puzzles to algorithmic challenges, each level is closely centered on the programmer's expertise and skills. Whether you're a novice programmer or an experienced tech guru, you'll find your own challenges on this site. In the process of solving puzzles, you can not only exercise your thinking skills, but also deepen your understanding and application of programming knowledge. Come to start this puzzle journey full of wisdom and challenges, with many programmers to compete with each other and show your programming wisdom! Translated with DeepL.com (free version)

What permissions does a role need for the user to be assigned as the author of a post?

matteradmin8PV0评论

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

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

Share Improve this question edited Apr 1, 2019 at 17:45 Yato asked Mar 29, 2019 at 13:38 YatoYato 175 bronze badges 2
  • You can try wordpress' default editor role – Vishwa Commented Mar 29, 2019 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 Commented Apr 1, 2019 at 13:37
Add a comment  | 

1 Answer 1

Reset to default 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.

Post a comment

comment list (0)

  1. No comments so far