Or, embed this snippet using GenerateWP WordPress Plugin.

Download

Clone

KCAI Staff

if ( ! function_exists('kcai_cpt_staff') ) {

// Register Custom Post Type
function kcai_cpt_staff() {

	$labels = array(
		'name'                => 'Staff',
		'singular_name'       => 'Staff',
		'menu_name'           => 'Staff',
		'name_admin_bar'      => 'Staff',
		'parent_item_colon'   => 'Parent Staff:',
		'all_items'           => 'All Items',
		'add_new_item'        => 'Add New Item',
		'add_new'             => 'Add New',
		'new_item'            => 'New Item',
		'edit_item'           => 'Edit Item',
		'update_item'         => 'Update Item',
		'view_item'           => 'View Item',
		'search_items'        => 'Search Item',
		'not_found'           => 'Not found',
		'not_found_in_trash'  => 'Not found in Trash',
	);
	$args = array(
		'label'               => 'Staff',
		'description'         => 'Faculty and Administration Profiles',
		'labels'              => $labels,
		'supports'            => array( 'title', 'editor', 'excerpt', 'thumbnail', ),
		'taxonomies'          => array( 'kcai_staff_type', 'kcai_major' ),
		'hierarchical'        => false,
		'public'              => true,
		'show_ui'             => true,
		'show_in_menu'        => true,
		'menu_position'       => 20,
		'menu_icon'           => 'dashicons-id-alt',
		'show_in_admin_bar'   => true,
		'show_in_nav_menus'   => true,
		'can_export'          => true,
		'has_archive'         => false,		
		'exclude_from_search' => false,
		'publicly_queryable'  => true,
		'rewrite'             => false,
		'capability_type'     => 'page',
	);
	register_post_type( 'kcai_staff', $args );

}
add_action( 'init', 'kcai_cpt_staff', 0 );

}