Taxonomia Eventos
// Register Custom Taxonomy
function eventos_taxonomy() {
$labels = array(
'name' => _x( 'Eventos', 'Taxonomy General Name', 'text_domain' ),
'singular_name' => _x( 'Evento', 'Taxonomy Singular Name', 'text_domain' ),
'menu_name' => __( 'Eventos', 'text_domain' ),
'all_items' => __( 'Todos los eventos', 'text_domain' ),
'parent_item' => __( 'Eventos padre', 'text_domain' ),
'parent_item_colon' => __( 'Evento:', 'text_domain' ),
'new_item_name' => __( 'Nuevo evento', '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 usados', 'text_domain' ),
'popular_items' => __( 'Populares', 'text_domain' ),
'search_items' => __( 'Buscar', 'text_domain' ),
'not_found' => __( 'No ancontrado', 'text_domain' ),
'no_terms' => __( 'No existem iten¿ms', 'text_domain' ),
'items_list' => __( 'Lista de items', 'text_domain' ),
'items_list_navigation' => __( 'Items de navegación', 'text_domain' ),
);
$rewrite = array(
'slug' => 'evento',
'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( 'evento', array( 'eventos_post_types' ), $args );
}
add_action( 'init', 'eventos_taxonomy', 0 );