Custom post type capabilities
-
Ola, just trying to setup a custom post type, something I’ve never had issues with, my issue is when I add capabilities to the post type is when I have issue, the post type seems to disappear, get the feeling I’ve missed something really obvious out. I’ve registered several other post type without capabilities which all work however this one just doesn’t appear, if a fresh pair of eyes could take a look that would be great, ta.
register_post_type( 'teacher', array( 'labels' => array( 'name' => __( 'Teachers' ), 'singular_name' => __( 'Teacher' ) ), 'public' => true, 'has_archive' => true, 'supports' => array( 'custom-fields',), 'capability_type' => 'teacher', 'capabilities' => array( 'publish_posts' => 'publish_teachers', 'edit_posts' => 'edit_teachers', 'edit_others_posts' => 'edit_others_teachers', 'delete_posts' => 'delete_teachers', 'delete_others_posts' => 'delete_others_teachers', 'read_private_posts' => 'read_private_teachers', 'edit_post' => 'edit_teacher', 'delete_post' => 'delete_teacher', 'read_post' => 'read_teacher',), ) );
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
The topic ‘Custom post type capabilities’ is closed to new replies.