repositorio_taxonomia
// Register Custom Taxonomy
function repositorio_taxonomy() {
$labels = array(
'name' => _x( 'Documentos', 'Taxonomy General Name', 'text_domain' ),
'singular_name' => _x( 'Documento', 'Taxonomy Singular Name', 'text_domain' ),
'menu_name' => __( 'Documento', 'text_domain' ),
'all_items' => __( 'All Items', 'text_domain' ),
'parent_item' => __( 'Parent Item', 'text_domain' ),
'parent_item_colon' => __( 'Parent Item:', 'text_domain' ),
'new_item_name' => __( 'Nuevo documento', 'text_domain' ),
'add_new_item' => __( 'Agregar', 'text_domain' ),
'edit_item' => __( 'Editar', 'text_domain' ),
'update_item' => __( 'Actualizar', 'text_domain' ),
'view_item' => __( 'Ver', 'text_domain' ),
'separate_items_with_commas' => __( 'Separar con comas', 'text_domain' ),
'add_or_remove_items' => __( 'Agregar o borrar', 'text_domain' ),
'choose_from_most_used' => __( 'Seleccionar más usadas', 'text_domain' ),
'popular_items' => __( 'Populares', 'text_domain' ),
'search_items' => __( 'Buscar', 'text_domain' ),
'not_found' => __( 'No encontrado', 'text_domain' ),
'no_terms' => __( 'No existen items', 'text_domain' ),
'items_list' => __( 'listar items', 'text_domain' ),
'items_list_navigation' => __( 'Items navegación', 'text_domain' ),
);
$rewrite = array(
'slug' => 'documento',
'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' => true,
'rewrite' => $rewrite,
'show_in_rest' => true,
);
register_taxonomy( 'documento', array( 'post_partitura' ), $args );
}
add_action( 'init', 'repositorio_taxonomy', 0 );