admin管理员组文章数量:1317915
I have a custom user role I've set up that has access only to 1 specific custom post type and nothing else ( no access to post, pages etc. ).
I've got it working however I can't seem to figure out how to give the custom role capabilities to edit, create, delete, and assign custom taxonomies of that custom post type. (regular wp user roles such as admin have no problem editing the custom taxonomy)
This is what I have: ( 'doc' is the name of my custom post type and 'doctype' is the taxonomy)
if I add 'edit_posts' => true,'manage_categories' => true, I can edit, create, etc the custom tax but I get all other post types and post and more.
add_role( 'customuser', 'Custom User',
array(
'read' => true,
'edit_doc' => true,
'edit_docs' => true,
'edit_published_docs' => true,
'edit_others_doc' => true,
'edit_others_docs' => true,
'delete_doc' => true,
'delete_published_docs' => true,
'publish_docs' => true,
)
);
How can I get the custom user to not only have access to the custom post type but also be able to edit it's custom tax without allowing access to other post types and posts
本文标签: Adding user capabilities for a custom taxonomy of a custom post type for a custom user
版权声明:本文标题:Adding user capabilities for a custom taxonomy of a custom post type for a custom user 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1742016111a2413800.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论