I created a new role: 'student' and student capabilities are as follows:
add_role( 'student', __( 'Student' ), array( 'read' => true, // true allows this capability ) );
I wanted to give all student to read a custom post type: 'Assignment'. But when I login as student I can't see any menu item named: Assignment. But when I login as 'teacher' I can see this 'assignment' menu. Here is the 'teacher' role capability:
add_role( 'teacher', __( 'Teacher' ), array( 'read' => true, // true allows this capability 'edit_posts' => true, 'delete_posts' => false, // Use false to explicitly deny ) );
Why student can't see assignment menu. What's wrong with my code?