Or, embed this snippet using GenerateWP WordPress Plugin.

Download

Clone

tax-decretos-muni

// Register Custom Taxonomy
function tax_decretos() {

	$labels = array(
		'name'                       => _x( 'decretos', 'Taxonomy General Name', 'text_domain' ),
		'singular_name'              => _x( 'decreto', 'Taxonomy Singular Name', 'text_domain' ),
		'menu_name'                  => __( 'Decretos', 'text_domain' ),
		'all_items'                  => __( 'Todos los Decretos', 'text_domain' ),
		'parent_item'                => __( 'Decreto padre', 'text_domain' ),
		'parent_item_colon'          => __( 'Decreto Padre', 'text_domain' ),
		'new_item_name'              => __( 'Nuevo decreto', 'text_domain' ),
		'add_new_item'               => __( 'Agregar nuevo decreto', 'text_domain' ),
		'edit_item'                  => __( 'Editar decreto', 'text_domain' ),
		'update_item'                => __( 'Actualizar decreto', 'text_domain' ),
		'view_item'                  => __( 'Ver decreto', 'text_domain' ),
		'separate_items_with_commas' => __( 'Separar decretos por comas', 'text_domain' ),
		'add_or_remove_items'        => __( 'Agregar o eliminar decretos', 'text_domain' ),
		'choose_from_most_used'      => __( 'Escoger de los más utilizados', 'text_domain' ),
		'popular_items'              => __( 'Decretos populares', 'text_domain' ),
		'search_items'               => __( 'Buscar decreto', 'text_domain' ),
		'not_found'                  => __( 'No se pudo encontrar', 'text_domain' ),
		'no_terms'                   => __( 'No hay decretos', 'text_domain' ),
		'items_list'                 => __( 'Lista de decretos', 'text_domain' ),
		'items_list_navigation'      => __( 'Lista de decretos', 'text_domain' ),
	);
	$args = array(
		'labels'                     => $labels,
		'hierarchical'               => false,
		'public'                     => true,
		'show_ui'                    => true,
		'show_admin_column'          => true,
		'show_in_nav_menus'          => true,
		'show_tagcloud'              => true,
		'show_in_rest'               => true,
	);
	register_taxonomy( 'decretos', array( 'decretos' ), $args );

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