Or, embed this snippet using GenerateWP WordPress Plugin.

Download

Clone

Staff Members CPT

// Register Custom Post Type
function staff_post_type() {

	$labels = array(
		'name'                => _x( 'Staff Members', 'Post Type General Name', 'diocese_theme' ),
		'singular_name'       => _x( 'Staff Member', 'Post Type Singular Name', 'diocese_theme' ),
		'menu_name'           => __( 'Staff Member', 'diocese_theme' ),
		'parent_item_colon'   => __( 'Parent Staff Member:', 'diocese_theme' ),
		'all_items'           => __( 'All Staff Members', 'diocese_theme' ),
		'view_item'           => __( 'View Staff Member', 'diocese_theme' ),
		'add_new_item'        => __( 'Add New Staff Member', 'diocese_theme' ),
		'add_new'             => __( 'Add New', 'diocese_theme' ),
		'edit_item'           => __( 'Edit Staff Member', 'diocese_theme' ),
		'update_item'         => __( 'Update Staff Member', 'diocese_theme' ),
		'search_items'        => __( 'Search Staff Member', 'diocese_theme' ),
		'not_found'           => __( 'Not found', 'diocese_theme' ),
		'not_found_in_trash'  => __( 'Not found in Trash', 'diocese_theme' ),
	);
	$args = array(
		'labels'              => $labels,
		'supports'            => array( 'title', 'author', 'revisions', 'page-attributes', ),
		'hierarchical'        => false,
		'public'              => true,
		'show_ui'             => true,
		'show_in_menu'        => true,
		'show_in_nav_menus'   => true,
		'show_in_admin_bar'   => true,
		'menu_position'       => 5,
		'menu_icon'           => 'dashicons-id',
		'can_export'          => true,
		'has_archive'         => true,
		'exclude_from_search' => false,
		'publicly_queryable'  => true,
		'capability_type'     => 'post',
	);
	register_post_type( 'doc_staff_member', $args );

}

// Hook into the 'init' action
add_action( 'init', 'staff_post_type', 0 );