post-screen
// Register Custom Post Type
function students_post_type() {
$labels = array(
'name' => 'students',
'singular_name' => 'Student',
'menu_name' => 'Students',
'parent_item_colon' => 'Parent Post:',
'all_items' => 'All Posts',
'view_item' => 'View Post',
'add_new_item' => 'Add New Post',
'add_new' => 'Add New',
'edit_item' => 'Edit Post',
'update_item' => 'Update Post',
'search_items' => 'Search Post',
'not_found' => 'Not found',
'not_found_in_trash' => 'Not found in Trash',
);
$capabilities = array(
'edit_post' => 'edit_student',
'read_post' => 'read_student',
'delete_post' => 'delete_student',
'edit_posts' => 'edit_students',
'edit_others_posts' => 'edit_others_students',
'publish_posts' => 'publish_students',
'read_private_posts' => 'read_private_students',
);
$args = array(
'label' => 'students',
'description' => 'students posts',
'labels' => $labels,
'supports' => array( 'title', 'editor', 'author', 'thumbnail', 'revisions', 'page-attributes', 'post-formats', ),
'taxonomies' => array( 'category', 'post_tag' ),
'hierarchical' => false,
'public' => true,
'show_ui' => true,
'show_in_menu' => true,
'menu_position' => 5,
'menu_icon' => 'dashicons-welcome-learn-more',
'show_in_admin_bar' => true,
'show_in_nav_menus' => false,
'can_export' => true,
'has_archive' => true,
'exclude_from_search' => false,
'publicly_queryable' => true,
'capabilities' => $capabilities,
);
register_post_type( 'students', $args );
}
// Hook into the 'init' action
add_action( 'init', 'students_post_type', 0 );