Volunteer Departments taxonomy
if ( ! function_exists( 'ewk_custom_taxonomy' ) ) {
// Register Custom Taxonomy
function ewk_custom_taxonomy() {
$labels = array(
'name' => _x( 'Volunteer Departments', 'Taxonomy General Name', 'ewk_functions' ),
'singular_name' => _x( 'Volunteer Department', 'Taxonomy Singular Name', 'ewk_functions' ),
'menu_name' => __( 'Volunteer Department', 'ewk_functions' ),
'all_items' => __( 'All Volunteer Department', 'ewk_functions' ),
'parent_item' => __( 'Parent Volunteer Department', 'ewk_functions' ),
'parent_item_colon' => __( 'Parent Volunteer Department:', 'ewk_functions' ),
'new_item_name' => __( 'New Volunteer Department', 'ewk_functions' ),
'add_new_item' => __( 'Add New Volunteer Department', 'ewk_functions' ),
'edit_item' => __( 'Edit Volunteer Department', 'ewk_functions' ),
'update_item' => __( 'Update Volunteer Department', 'ewk_functions' ),
'view_item' => __( 'View Volunteer Department', 'ewk_functions' ),
'separate_items_with_commas' => __( 'Separate Volunteer Departments with commas', 'ewk_functions' ),
'add_or_remove_items' => __( 'Add or remove Volunteer Departments', 'ewk_functions' ),
'choose_from_most_used' => __( 'Choose from the most used', 'ewk_functions' ),
'popular_items' => __( 'Popular Volunteer Departments', 'ewk_functions' ),
'search_items' => __( 'Search Volunteer Departments', 'ewk_functions' ),
'not_found' => __( 'Not Found', 'ewk_functions' ),
'no_terms' => __( 'No items', 'ewk_functions' ),
'items_list' => __( 'Volunteer Departments list', 'ewk_functions' ),
'items_list_navigation' => __( 'Volunteer Departments list navigation', 'ewk_functions' ),
);
$args = array(
'labels' => $labels,
'hierarchical' => true,
'public' => true,
'show_ui' => true,
'show_admin_column' => true,
'show_in_nav_menus' => true,
'show_tagcloud' => false,
'show_in_rest' => true,
);
register_taxonomy( 'volunteer_department', array( 'volunteer_opp' ), $args );
}
add_action( 'init', 'ewk_custom_taxonomy', 0 );
}