admin管理员组文章数量:1435859
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
1 Answer
Reset to default 0You 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.
本文标签: What permissions does a role need for the user to be assigned as the author of a post
版权声明:本文标题:What permissions does a role need for the user to be assigned as the author of a post? 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1745638898a2667731.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论