Or, embed this snippet using GenerateWP WordPress Plugin.

Download

Clone

Areas

if ( ! function_exists( 'area' ) ) {

// Register Custom Taxonomy
function area() {

	$labels = array(
		'name'                       => 'Areas',
		'singular_name'              => 'Area',
		'menu_name'                  => 'Area',
		'all_items'                  => 'All Areas',
		'parent_item'                => 'Parent Area',
		'parent_item_colon'          => 'Parent Area:',
		'new_item_name'              => 'New Area',
		'add_new_item'               => 'Add New Area',
		'edit_item'                  => 'Edit Area',
		'update_item'                => 'Update Area',
		'separate_items_with_commas' => 'Separate Areas with commas',
		'search_items'               => 'Search Areas',
		'add_or_remove_items'        => 'Add or remove Areas',
		'choose_from_most_used'      => 'Choose from the most used Areas',
		'not_found'                  => 'Not Found',
	);
	$rewrite = array(
		'slug'                       => 'area',
		'with_front'                 => true,
		'hierarchical'               => false,
	);
	$args = array(
		'labels'                     => $labels,
		'hierarchical'               => true,
		'public'                     => true,
		'show_ui'                    => true,
		'show_admin_column'          => true,
		'show_in_nav_menus'          => true,
		'show_tagcloud'              => true,
		'rewrite'                    => $rewrite,
	);
	register_taxonomy( 'fopo_area', array( 'post', ' page' ), $args );

}

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

}