Or, embed this snippet using GenerateWP WordPress Plugin.

Download

Clone

Custom Tax w/ CPT

// Register Custom Taxonomy
function register_tax_bp_floor() {

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

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