Faculty
// Register Custom Post Type
function faculties_list() {
$labels = array(
'name' => _x( 'Faculties', 'Post Type General Name', 'yellow_slice' ),
'singular_name' => _x( 'Faculty', 'Post Type Singular Name', 'yellow_slice' ),
'menu_name' => __( 'Faculty', 'yellow_slice' ),
'name_admin_bar' => __( 'Faculties', 'yellow_slice' ),
'archives' => __( 'Item Archives', 'yellow_slice' ),
'attributes' => __( 'Item Attributes', 'yellow_slice' ),
'parent_item_colon' => __( 'Parent Item:', 'yellow_slice' ),
'all_items' => __( 'All Items', 'yellow_slice' ),
'add_new_item' => __( 'Add New Item', 'yellow_slice' ),
'add_new' => __( 'Add New Faculty', 'yellow_slice' ),
'new_item' => __( 'New Faculty', 'yellow_slice' ),
'edit_item' => __( 'Edit Faculty', 'yellow_slice' ),
'update_item' => __( 'Update Faculty', 'yellow_slice' ),
'view_item' => __( 'View Faculty', 'yellow_slice' ),
'view_items' => __( 'View Faculties', 'yellow_slice' ),
'search_items' => __( 'Search Faculty', 'yellow_slice' ),
'not_found' => __( 'No Faculties added', 'yellow_slice' ),
'not_found_in_trash' => __( 'Not found in Trash', 'yellow_slice' ),
'featured_image' => __( 'Faculty Image', 'yellow_slice' ),
'set_featured_image' => __( 'Set Faculty Image', 'yellow_slice' ),
'remove_featured_image' => __( 'Remove featured image', 'yellow_slice' ),
'use_featured_image' => __( 'Use as featured image', 'yellow_slice' ),
'insert_into_item' => __( 'Insert into Faculty', 'yellow_slice' ),
'uploaded_to_this_item' => __( 'Uploaded to this item', 'yellow_slice' ),
'items_list' => __( 'Items list', 'yellow_slice' ),
'items_list_navigation' => __( 'Items list navigation', 'yellow_slice' ),
'filter_items_list' => __( 'Filter faculty list', 'yellow_slice' ),
);
$args = array(
'label' => __( 'Faculty', 'yellow_slice' ),
'description' => __( 'Faculties List', 'yellow_slice' ),
'labels' => $labels,
'supports' => array( 'title', 'editor', 'thumbnail' ),
'taxonomies' => array( 'faculties' ),
'hierarchical' => true,
'public' => true,
'show_ui' => true,
'show_in_menu' => true,
'menu_position' => 5,
'menu_icon' => 'dashicons-groups',
'show_in_admin_bar' => true,
'show_in_nav_menus' => true,
'can_export' => true,
'has_archive' => true,
'exclude_from_search' => false,
'publicly_queryable' => true,
'capability_type' => 'page',
'show_in_rest' => true,
);
register_post_type( 'faculty', $args );
}
add_action( 'init', 'faculties_list', 0 );