Custom Post Type Capability Problems
I am designing a website for teachers and students to post and review assignments for academic courses. There will be both student and teacher roles created and I need to be able to have students only be able to view, create and publish to one custom post type (Submissions) and not be able to edit or create any thing else. In register_post_type i put this in for capabilities.
'capability_type' => 'submissions',
'capabilities' => array(
'publish_posts' => 'publish_submissions',
'edit_posts' => 'edit_submissions',
'edit_published_posts' => 'edit_published_submissions',
'delete_published_posts' => 'delete_published_submissions',
'edit_others_posts' => 'edit_others_submissions',
'delete_posts' => 'delete_submissions',
'delete_others_posts' => 'delete_others_submissions',
'read_private_posts' => 'read_private_submissions',
'edit_post' => 'edit_submission',
'delete_post' => 'delete_submission',
'read_post' => 'read_submission',
However when I log in with a student profile I can view the Student Submissions section but when I try to Publish a post I get an error telling me “You are not allowed to edit this post”. If I back up in my browser the post has been created but I only have “View” capability.
What am I missing? I have searched all over the web and cannot find any discussion of this problem. I have read Justin Tadlock’s article on capabilities but am not able to find an answer to this issue.
- The topic ‘Custom Post Type Capability Problems’ is closed to new replies.