Position Types Taxonomy
This is used to created a position type for an employment custom post type.
if ( ! function_exists( 'hms_taxonomies' ) ) { // Register Custom Taxonomy function hms_taxonomies() { $labels = array( 'name' => _x( 'Position Types', 'Taxonomy General Name', 'hms-custom-post-types' ), 'singular_name' => _x( 'Position Type', 'Taxonomy Singular Name', 'hms-custom-post-types' ), 'menu_name' => __( 'Position Types', 'hms-custom-post-types' ), 'all_items' => __( 'All Positions', 'hms-custom-post-types' ), 'parent_item' => __( 'Parent Position Type', 'hms-custom-post-types' ), 'parent_item_colon' => __( 'Parent Position Type:', 'hms-custom-post-types' ), 'new_item_name' => __( 'New Position Type', 'hms-custom-post-types' ), 'add_new_item' => __( 'New Position Type', 'hms-custom-post-types' ), 'edit_item' => __( 'Edit Position Type', 'hms-custom-post-types' ), 'update_item' => __( 'Update Position Type', 'hms-custom-post-types' ), 'view_item' => __( 'View Position Type', 'hms-custom-post-types' ), 'separate_items_with_commas' => __( 'Separate items with commas', 'hms-custom-post-types' ), 'add_or_remove_items' => __( 'Add or remove position types', 'hms-custom-post-types' ), 'choose_from_most_used' => __( 'Most Used Position Types', 'hms-custom-post-types' ), 'popular_items' => __( 'Popular Position Types', 'hms-custom-post-types' ), 'search_items' => __( 'Search Positions', 'hms-custom-post-types' ), 'not_found' => __( 'No Positions Found', 'hms-custom-post-types' ), 'no_terms' => __( 'No Position Types', 'hms-custom-post-types' ), 'items_list' => __( 'Position Types', 'hms-custom-post-types' ), 'items_list_navigation' => __( 'Position Types List Navigation', 'hms-custom-post-types' ), ); $capabilities = array( 'manage_terms' => 'manage_categories', 'edit_terms' => 'manage_categories', 'delete_terms' => 'manage_categories', 'assign_terms' => 'edit_posts', ); $args = array( 'labels' => $labels, 'hierarchical' => true, 'public' => true, 'show_ui' => true, 'show_admin_column' => true, 'show_in_nav_menus' => true, 'show_tagcloud' => true, 'capabilities' => $capabilities, ); register_taxonomy( 'position-type', array( 'employment' ), $args ); } add_action( 'init', 'hms_taxonomies', 0 ); }