TAXONOMIA regs
if ( ! function_exists( 'regs_taxonomy' ) ) {
// Register Custom Taxonomy
function regs_taxonomy() {
$labels = array(
'name' => _x( 'Regs', 'Taxonomy General Name', 'regs_domain' ),
'singular_name' => _x( 'Reg', 'Taxonomy Singular Name', 'regs_domain' ),
'menu_name' => __( 'Regs', 'regs_domain' ),
'all_items' => __( 'Tots el regs', 'regs_domain' ),
'parent_item' => __( 'Pare del reg', 'regs_domain' ),
'parent_item_colon' => __( 'Pare del reg:', 'regs_domain' ),
'new_item_name' => __( 'Nou reg', 'regs_domain' ),
'add_new_item' => __( 'Agregar nou reg', 'regs_domain' ),
'edit_item' => __( 'Editar reg', 'regs_domain' ),
'update_item' => __( 'Actualitzar reg', 'regs_domain' ),
'view_item' => __( 'Vore reg', 'regs_domain' ),
'separate_items_with_commas' => __( 'Separa els regs amb comes', 'regs_domain' ),
'add_or_remove_items' => __( 'Agregar o borrar regs', 'regs_domain' ),
'choose_from_most_used' => __( 'Trieu un dels més utilitzats', 'regs_domain' ),
'popular_items' => __( 'Regs populars', 'regs_domain' ),
'search_items' => __( 'Buscar regs', 'regs_domain' ),
'not_found' => __( 'No trobats', 'regs_domain' ),
'no_terms' => __( 'No regs', 'regs_domain' ),
'items_list' => __( 'Llista de regs', 'regs_domain' ),
'items_list_navigation' => __( 'Navegació a la llista de regs', 'regs_domain' ),
);
$rewrite = array(
'slug' => 'regs',
'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,
);
register_taxonomy( 'regs', array( 'tipus-convocatoria-reg' ), $args );
}
add_action( 'init', 'regs_taxonomy', 0 );
}