User Capabilities not displaying corresponding items in dashboard
-
Hi,
I have added a new user role and I want to give it the capability to publish posts. However, no publish posts item appears in the dashboard so I can’t see a way to publish the post.
Here is the code for the new role:
// Projects add_action('admin_init', 'projects_role'); function projects_role() { $projects = add_role('projects', 'Projects Group', array( 'read' => true, 'publish_posts' => true, 'view_projects' )); $projects = get_role('projects'); $projects->add_cap('view_projects'); }
If I do a test such as:
if ( current_user_can( 'publish_posts' ) ) { echo 'The current user can publish_posts'; }
It outputs ‘The current user can publish_posts’ yet I can’t actually see a way to do it. What am I doing wrong?
I also have numerous other roles that have the same issue.
Thanks
- The topic ‘User Capabilities not displaying corresponding items in dashboard’ is closed to new replies.