Or, embed this snippet using GenerateWP WordPress Plugin.

Download

Clone

People Post Type

// Register Custom Post Type
function brvry_post_types() {

	$labels = array(
		'name'                => _x( 'People', 'Post Type General Name', 'brvry' ),
		'singular_name'       => _x( 'Person', 'Post Type Singular Name', 'brvry' ),
		'menu_name'           => __( 'People', 'brvry' ),
		'parent_item_colon'   => __( 'Parent Person:', 'brvry' ),
		'all_items'           => __( 'All People', 'brvry' ),
		'view_item'           => __( 'View Person', 'brvry' ),
		'add_new_item'        => __( 'Add New Person', 'brvry' ),
		'add_new'             => __( 'Add New', 'brvry' ),
		'edit_item'           => __( 'Edit Person', 'brvry' ),
		'update_item'         => __( 'Update Person', 'brvry' ),
		'search_items'        => __( 'Search People', 'brvry' ),
		'not_found'           => __( 'Not found', 'brvry' ),
		'not_found_in_trash'  => __( 'Not found in Trash', 'brvry' ),
	);
	$args = array(
		'label'               => __( 'People', 'brvry' ),
		'description'         => __( 'Creates a directory of people', 'brvry' ),
		'labels'              => $labels,
		'supports'            => array( 'title', 'editor', 'thumbnail', 'revisions', ),
		'taxonomies'          => array( 'role' ),
		'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-groups',
		'can_export'          => true,
		'has_archive'         => true,
		'exclude_from_search' => false,
		'publicly_queryable'  => true,
		'capability_type'     => 'page',
	);
	register_post_type( 'People', $args );

}

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