Or, embed this snippet using GenerateWP WordPress Plugin.

Download

Clone

CTCA – Cancer Types

// Register Custom Taxonomy
function cancer_type_tax() {

	$labels = array(
		'name'                       => 'Cancer Types',
		'singular_name'              => 'Cancer Type',
		'menu_name'                  => 'Cancer Types',
		'all_items'                  => 'All Cancer Types',
		'parent_item'                => 'Parent Cancer Type',
		'parent_item_colon'          => 'Parent Cancer Type:',
		'new_item_name'              => 'New Cancer Type',
		'add_new_item'               => 'Add New Cancer Type',
		'edit_item'                  => 'Edit Cancer Type',
		'update_item'                => 'Update Cancer Type',
		'separate_items_with_commas' => 'Separate items with commas',
		'search_items'               => 'Search Cancer Types',
		'add_or_remove_items'        => 'Add or remove items',
		'choose_from_most_used'      => 'Choose from the most used cancer types',
		'not_found'                  => 'Not Found',
	);
	$args = array(
		'labels'                     => $labels,
		'hierarchical'               => true,
		'public'                     => true,
		'show_ui'                    => true,
		'show_admin_column'          => true,
		'show_in_nav_menus'          => true,
		'show_tagcloud'              => true,
		'rewrite'                    => false,
	);
	register_taxonomy( 'cancer_type', array( 'link' ), $args );

}

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