Or, embed this snippet using GenerateWP WordPress Plugin.

Download

Clone

Tax_editor

Agregar Editores o editoriales

if ( ! function_exists( 'editor_taxonomy' ) ) {

// Register Custom Taxonomy
function editor_taxonomy() {

	$labels = array(
		'name'                       => _x( 'Editores', 'Taxonomy General Name', 'text_domain' ),
		'singular_name'              => _x( 'Editor', 'Taxonomy Singular Name', 'text_domain' ),
		'menu_name'                  => __( 'Editor', 'text_domain' ),
		'all_items'                  => __( 'Todos los Editores', 'text_domain' ),
		'parent_item'                => __( 'Editor padre', 'text_domain' ),
		'parent_item_colon'          => __( 'Editor:', 'text_domain' ),
		'new_item_name'              => __( 'Nuevo editor', 'text_domain' ),
		'add_new_item'               => __( 'Agregar nuevo editor', 'text_domain' ),
		'edit_item'                  => __( 'Editar', 'text_domain' ),
		'update_item'                => __( 'Actualizar', 'text_domain' ),
		'view_item'                  => __( 'Ver editor', '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 encontrado', 'text_domain' ),
		'no_terms'                   => __( 'No existen items', 'text_domain' ),
		'items_list'                 => __( 'Lista de Items', 'text_domain' ),
		'items_list_navigation'      => __( 'Listado navegable de Editores', 'text_domain' ),
	);
	$rewrite = array(
		'slug'                       => '',
		'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( 'editor', array( 'post' ), $args );

}
add_action( 'init', 'editor_taxonomy', 0 );

}