Service Source – Locations Tax
// Register Custom Taxonomy
function create_location_tax() {
$labels = array(
'name' => _x( 'Locations', 'Taxonomy General Name', 'servicesource' ),
'singular_name' => _x( 'Location', 'Taxonomy Singular Name', 'servicesource' ),
'menu_name' => __( 'Locations', 'servicesource' ),
'all_items' => __( 'All Locations', 'servicesource' ),
'parent_item' => __( 'Parent Location', 'servicesource' ),
'parent_item_colon' => __( 'Parent Location:', 'servicesource' ),
'new_item_name' => __( 'New Location Name', 'servicesource' ),
'add_new_item' => __( 'Add New Location', 'servicesource' ),
'edit_item' => __( 'Edit Location', 'servicesource' ),
'update_item' => __( 'Update Location', 'servicesource' ),
'view_item' => __( 'View Location', 'servicesource' ),
'separate_items_with_commas' => __( 'Separate Locations with commas', 'servicesource' ),
'add_or_remove_items' => __( 'Add or remove locations', 'servicesource' ),
'choose_from_most_used' => __( 'Choose from the most used', 'servicesource' ),
'popular_items' => __( 'Popular Locations', 'servicesource' ),
'search_items' => __( 'Search Locations', 'servicesource' ),
'not_found' => __( 'Not Found', 'servicesource' ),
'no_terms' => __( 'No Locations', 'servicesource' ),
'items_list' => __( 'Locations list', 'servicesource' ),
'items_list_navigation' => __( 'Locations list navigation', 'servicesource' ),
);
$rewrite = array(
'slug' => 'locations',
'with_front' => true,
'hierarchical' => false,
);
$args = array(
'labels' => $labels,
'hierarchical' => false,
'public' => true,
'show_ui' => true,
'show_admin_column' => true,
'show_in_nav_menus' => true,
'show_tagcloud' => false,
'rewrite' => $rewrite,
);
register_taxonomy( 'location_tax', array( 'services_cpt', ' solutions_cpt' ), $args );
}
add_action( 'init', 'create_location_tax', 0 );