property_tax_city
City Taxonomy for CPT Property
if ( ! function_exists( 'property_tax_city' ) ) { // Register Custom Taxonomy function property_tax_city() { $labels = array( 'name' => _x( 'Cities', 'Taxonomy General Name', 'gum-bcrapp' ), 'singular_name' => _x( 'City', 'Taxonomy Singular Name', 'gum-bcrapp' ), 'menu_name' => __( 'City', 'gum-bcrapp' ), 'all_items' => __( 'All Cities', 'gum-bcrapp' ), 'parent_item' => __( 'Parent City', 'gum-bcrapp' ), 'parent_item_colon' => __( 'Parent City:', 'gum-bcrapp' ), 'new_item_name' => __( 'New City', 'gum-bcrapp' ), 'add_new_item' => __( 'Add New City', 'gum-bcrapp' ), 'edit_item' => __( 'Edit City', 'gum-bcrapp' ), 'update_item' => __( 'Update City', 'gum-bcrapp' ), 'separate_items_with_commas' => __( 'Separate items with commas', 'gum-bcrapp' ), 'search_items' => __( 'Search Cities', 'gum-bcrapp' ), 'add_or_remove_items' => __( 'Add or remove cities', 'gum-bcrapp' ), 'choose_from_most_used' => __( 'Choose from the most used cities', 'gum-bcrapp' ), 'not_found' => __( 'Not Found', 'gum-bcrapp' ), ); $args = array( 'labels' => $labels, 'hierarchical' => false, 'public' => true, 'show_ui' => true, 'show_admin_column' => true, 'show_in_nav_menus' => true, 'show_tagcloud' => true, ); register_taxonomy( 'city', array( 'property' ), $args ); } // Hook into the 'init' action add_action( 'init', 'property_tax_city', 0 ); }