// Register Custom Taxonomy function register_city_taxonomy() { $labels = array( 'name' => _x( 'Cities', 'Taxonomy General Name', 'sharan' ), 'singular_name' => _x( 'City', 'Taxonomy Singular Name', 'sharan' ), 'menu_name' => __( 'City', 'sharan' ), 'all_items' => __( 'All Cities', 'sharan' ), 'parent_item' => __( 'Parent City', 'sharan' ), 'parent_item_colon' => __( 'Parent City:', 'sharan' ), 'new_item_name' => __( 'New City Name', 'sharan' ), 'add_new_item' => __( 'Add New City', 'sharan' ), 'edit_item' => __( 'Edit City', 'sharan' ), 'update_item' => __( 'Update City', 'sharan' ), 'view_item' => __( 'View Item', 'sharan' ), 'separate_items_with_commas' => __( 'Separate cities with commas', 'sharan' ), 'add_or_remove_items' => __( 'Add or remove cities', 'sharan' ), 'choose_from_most_used' => __( 'Choose from the most used cities', 'sharan' ), 'popular_items' => __( 'Popular Items', 'sharan' ), 'search_items' => __( 'Search Cities', 'sharan' ), 'not_found' => __( 'City Not Found', 'sharan' ), 'no_terms' => __( 'No items', 'sharan' ), 'items_list' => __( 'Items list', 'sharan' ), 'items_list_navigation' => __( 'Items list navigation', 'sharan' ), ); $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( 'custom_post_type' ), $args ); } add_action( 'init', 'register_city_taxonomy', 0 );