Or, embed this snippet using GenerateWP WordPress Plugin.

Download

Clone

Autoluce Categorie Attrezzatura

if ( ! function_exists( 'attrezzatura_cat_taxonomy' ) ) {

// Register Custom Taxonomy
function attrezzatura_cat_taxonomy() {

	$labels = array(
		'name'                       => _x( 'Categorie Attrezzature', 'Taxonomy General Name', 'autoluce_post_type' ),
		'singular_name'              => _x( 'Categoria Attrezzatura', 'Taxonomy Singular Name', 'autoluce_post_type' ),
		'menu_name'                  => __( 'Categorie', 'autoluce_post_type' ),
		'all_items'                  => __( 'Tutte le Categorie', 'autoluce_post_type' ),
		'parent_item'                => __( 'Categoria Genitore', 'autoluce_post_type' ),
		'parent_item_colon'          => __( 'Categoria Genitore:', 'autoluce_post_type' ),
		'new_item_name'              => __( 'Nuovo Nome di Categoria', 'autoluce_post_type' ),
		'add_new_item'               => __( 'Aggiungi Nuova Categoria', 'autoluce_post_type' ),
		'edit_item'                  => __( 'Modifica Categoria', 'autoluce_post_type' ),
		'update_item'                => __( 'Aggiorna Categoria', 'autoluce_post_type' ),
		'view_item'                  => __( 'Vedi Categoria', 'autoluce_post_type' ),
		'separate_items_with_commas' => __( 'Separa categorie con la virgola', 'autoluce_post_type' ),
		'add_or_remove_items'        => __( 'Aggiungi o rimuovi Categorie', 'autoluce_post_type' ),
		'choose_from_most_used'      => __( 'Scegli tra le più usate', 'autoluce_post_type' ),
		'popular_items'              => __( 'Categorie Più usate', 'autoluce_post_type' ),
		'search_items'               => __( 'Cerca Categorie', 'autoluce_post_type' ),
		'not_found'                  => __( 'Nessun risultato', 'autoluce_post_type' ),
		'no_terms'                   => __( 'Nessuna Categoria', 'autoluce_post_type' ),
		'items_list'                 => __( 'Lista Categorie', 'autoluce_post_type' ),
		'items_list_navigation'      => __( 'Navigazione lista Categorie', 'autoluce_post_type' ),
	);
	$rewrite = array(
		'slug'                       => 'attrezzatura/categoria',
		'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'              => false,
		'rewrite'                    => $rewrite,
	);
	register_taxonomy( 'attrezzatura_cat', array( 'attrezzatura' ), $args );

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

}