Or, embed this snippet using GenerateWP WordPress Plugin.

Download

Clone

Taxonomía tipos

if ( ! function_exists( 'tipo_de_obra' ) ) {

// Register Custom Taxonomy
function tipo_de_obra() {

	$labels = array(
		'name'                       => _x( 'tipos', 'Taxonomy General Name', 'tipo_de_obra' ),
		'singular_name'              => _x( 'tipo', 'Taxonomy Singular Name', 'tipo_de_obra' ),
		'menu_name'                  => __( 'tipo', 'tipo_de_obra' ),
		'all_items'                  => __( 'tipos', 'tipo_de_obra' ),
		'parent_item'                => __( 'Padre tipo', 'tipo_de_obra' ),
		'parent_item_colon'          => __( 'Padre tipos', 'tipo_de_obra' ),
		'new_item_name'              => __( 'Nuevo tipo', 'tipo_de_obra' ),
		'add_new_item'               => __( 'Añadir tipo', 'tipo_de_obra' ),
		'edit_item'                  => __( 'Editar tipo', 'tipo_de_obra' ),
		'update_item'                => __( 'Actualizar tipo', 'tipo_de_obra' ),
		'view_item'                  => __( 'Ver tipo', 'tipo_de_obra' ),
		'separate_items_with_commas' => __( 'Separar con comas', 'tipo_de_obra' ),
		'add_or_remove_items'        => __( 'Añadir o borrar tipos', 'tipo_de_obra' ),
		'choose_from_most_used'      => __( 'Elige entre los más utilizados', 'tipo_de_obra' ),
		'popular_items'              => __( 'Tipos populares', 'tipo_de_obra' ),
		'search_items'               => __( 'Buscar tipos', 'tipo_de_obra' ),
		'not_found'                  => __( 'No encontrado', 'tipo_de_obra' ),
		'no_terms'                   => __( 'Sin tipo', 'tipo_de_obra' ),
		'items_list'                 => __( 'Lista de tipos', 'tipo_de_obra' ),
		'items_list_navigation'      => __( 'Lista de artículos de navegación', 'tipo_de_obra' ),
	);
	$rewrite = array(
		'slug'                       => 'tipo',
		'with_front'                 => true,
		'hierarchical'               => true,
	);
	$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,
	);
	register_taxonomy( 'tipo', array( 'tipo' ), $args );

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

}