Or, embed this snippet using GenerateWP WordPress Plugin.

Download

Clone

Categorie Scuole

// Register Custom Taxonomy
function scuole_category_taxonomy() {

	$labels = array(
		'name'                       => _x( 'Schools Categories', 'Taxonomy General Name', 'swing_fever_plugin' ),
		'singular_name'              => _x( 'Schools Category', 'Taxonomy Singular Name', 'swing_fever_plugin' ),
		'menu_name'                  => __( 'School Category', 'swing_fever_plugin' ),
		'all_items'                  => __( 'All School Categories', 'swing_fever_plugin' ),
		'parent_item'                => __( 'Parent School Category', 'swing_fever_plugin' ),
		'parent_item_colon'          => __( 'Parent Category:', 'swing_fever_plugin' ),
		'new_item_name'              => __( 'New School Category Name', 'swing_fever_plugin' ),
		'add_new_item'               => __( 'Add New School Category', 'swing_fever_plugin' ),
		'edit_item'                  => __( 'Edit School Category', 'swing_fever_plugin' ),
		'update_item'                => __( 'Update School Category', 'swing_fever_plugin' ),
		'separate_items_with_commas' => __( 'Separate School Categories with commas', 'swing_fever_plugin' ),
		'search_items'               => __( 'Search School Categories', 'swing_fever_plugin' ),
		'add_or_remove_items'        => __( 'Add or remove School Categories', 'swing_fever_plugin' ),
		'choose_from_most_used'      => __( 'Choose from the most used School Categories', 'swing_fever_plugin' ),
		'not_found'                  => __( 'Not Found', 'swing_fever_plugin' ),
	);
	$rewrite = array(
		'slug'                       => 'scuole-swing',
		'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'              => false,
		'rewrite'                    => $rewrite,
	);
	register_taxonomy( 'scuole_category', array( 'scuola_type' ), $args );

}

// Hook into the 'init' action
add_action( 'init', 'scuole_category_taxonomy', 0 );