Sector Category
if ( ! function_exists( 'sector_category_taxonomy' ) ) {
// Register Custom Taxonomy
function sector_category_taxonomy() {
$labels = array(
'name' => _x( 'Sectores', 'Taxonomy General Name', 'dr_sector_category_domain' ),
'singular_name' => _x( 'Sector', 'Taxonomy Singular Name', 'dr_sector_category_domain' ),
'menu_name' => __( 'Sector', 'dr_sector_category_domain' ),
'all_items' => __( 'All Items', 'dr_sector_category_domain' ),
'parent_item' => __( 'Parent Item', 'dr_sector_category_domain' ),
'parent_item_colon' => __( 'Parent Item:', 'dr_sector_category_domain' ),
'new_item_name' => __( 'New Item Name', 'dr_sector_category_domain' ),
'add_new_item' => __( 'Add New Item', 'dr_sector_category_domain' ),
'edit_item' => __( 'Edit Item', 'dr_sector_category_domain' ),
'update_item' => __( 'Update Item', 'dr_sector_category_domain' ),
'view_item' => __( 'View Item', 'dr_sector_category_domain' ),
'separate_items_with_commas' => __( 'Separate items with commas', 'dr_sector_category_domain' ),
'add_or_remove_items' => __( 'Add or remove items', 'dr_sector_category_domain' ),
'choose_from_most_used' => __( 'Choose from the most used', 'dr_sector_category_domain' ),
'popular_items' => __( 'Popular Items', 'dr_sector_category_domain' ),
'search_items' => __( 'Search Items', 'dr_sector_category_domain' ),
'not_found' => __( 'Not Found', 'dr_sector_category_domain' ),
'no_terms' => __( 'No items', 'dr_sector_category_domain' ),
'items_list' => __( 'Items list', 'dr_sector_category_domain' ),
'items_list_navigation' => __( 'Items list navigation', 'dr_sector_category_domain' ),
);
$rewrite = array(
'slug' => 'sector',
'with_front' => true,
'hierarchical' => false,
);
$args = array(
'labels' => $labels,
'hierarchical' => true,
'public' => true,
'show_ui' => true,
'show_admin_column' => true,
'show_in_nav_menus' => true,
'show_tagcloud' => true,
'rewrite' => $rewrite,
'show_in_rest' => true,
'rest_base' => 'sectors',
);
register_taxonomy( 'Sector', array( 'dr_lessons', ' dr_template_pack' ), $args );
}
add_action( 'init', 'sector_category_taxonomy', 0 );
}