Or, embed this snippet using GenerateWP WordPress Plugin.

Download

Clone

People Category Taxonomy

People Category Taxonomy

// Register Custom Taxonomy
function btc_register_taxonomies() {

	$labels = array(
		'name'                       => _x( 'People Categories', 'Taxonomy General Name', 'btc_domain' ),
		'singular_name'              => _x( 'People Category', 'Taxonomy Singular Name', 'btc_domain' ),
		'menu_name'                  => __( 'People Category', 'btc_domain' ),
		'all_items'                  => __( 'All Categories', 'btc_domain' ),
		'parent_item'                => __( 'Parent Category', 'btc_domain' ),
		'parent_item_colon'          => __( 'Parent Category:', 'btc_domain' ),
		'new_item_name'              => __( 'New Category Name', 'btc_domain' ),
		'add_new_item'               => __( 'Add New Category', 'btc_domain' ),
		'edit_item'                  => __( 'Edit Category', 'btc_domain' ),
		'update_item'                => __( 'Update Category', 'btc_domain' ),
		'view_item'                  => __( 'View Category', 'btc_domain' ),
		'separate_items_with_commas' => __( 'Separate categories with commas', 'btc_domain' ),
		'add_or_remove_items'        => __( 'Add or remove categories', 'btc_domain' ),
		'choose_from_most_used'      => __( 'Choose from the most used', 'btc_domain' ),
		'popular_items'              => __( 'Popular Categories', 'btc_domain' ),
		'search_items'               => __( 'Search Categories', 'btc_domain' ),
		'not_found'                  => __( 'Not Found', 'btc_domain' ),
		'no_terms'                   => __( 'No categories', 'btc_domain' ),
		'items_list'                 => __( 'Categories list', 'btc_domain' ),
		'items_list_navigation'      => __( 'Categories list navigation', 'btc_domain' ),
	);
	$args = array(
		'labels'                     => $labels,
		'hierarchical'               => true,
		'public'                     => true,
		'show_ui'                    => true,
		'show_admin_column'          => true,
		'show_in_nav_menus'          => true,
		'show_tagcloud'              => false,
		'show_in_rest'               => false,
	);
	register_taxonomy( 'people_category', array( 'people' ), $args );

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