Or, embed this snippet using GenerateWP WordPress Plugin.

Download

Clone

Categorías Bricopots

if ( ! function_exists( 'potsdeco' ) ) {

// Register Custom Taxonomy
function potsdeco() {

	$labels = array(
		'name'                       => _x( 'Categorías Potsdeco', 'Taxonomy General Name', 'text_domain' ),
		'singular_name'              => _x( 'Categoría Potsdeco', 'Taxonomy Singular Name', 'text_domain' ),
		'menu_name'                  => __( 'Categorías Potsdeco', 'text_domain' ),
		'all_items'                  => __( 'Todas las categorías', 'text_domain' ),
		'parent_item'                => __( 'Categoría padre', 'text_domain' ),
		'parent_item_colon'          => __( 'Categoría padre:', 'text_domain' ),
		'new_item_name'              => __( 'Nueva', 'text_domain' ),
		'add_new_item'               => __( 'Añadir nueva', 'text_domain' ),
		'edit_item'                  => __( 'Editar', 'text_domain' ),
		'update_item'                => __( 'Actualizar', 'text_domain' ),
		'view_item'                  => __( 'Ver', 'text_domain' ),
		'separate_items_with_commas' => __( 'Separar items con comas', 'text_domain' ),
		'add_or_remove_items'        => __( 'Añadir o eliminar items', 'text_domain' ),
		'choose_from_most_used'      => __( 'Elegir entre las más usadas', 'text_domain' ),
		'popular_items'              => __( 'Más populares', 'text_domain' ),
		'search_items'               => __( 'Buscar items', 'text_domain' ),
		'not_found'                  => __( 'No encontrado', 'text_domain' ),
		'no_terms'                   => __( 'No hay ítems', 'text_domain' ),
		'items_list'                 => __( 'Listado de categorías', 'text_domain' ),
		'items_list_navigation'      => __( 'Items list navigation', 'text_domain' ),
	);
	$rewrite = array(
		'slug'                       => 'categoria_bricopots',
		'with_front'                 => false,
		'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( 'taxonomy', array( 'product' ), $args );

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

}