Or, embed this snippet using GenerateWP WordPress Plugin.

Download

Clone

Kolory

taksonomia

// Register Custom Taxonomy
function custom_taxonomy() {

	$labels = array(
		'name'                       => _x( 'Kolory', 'Taxonomy General Name', 'text_domain' ),
		'singular_name'              => _x( 'Kolor', 'Taxonomy Singular Name', 'text_domain' ),
		'menu_name'                  => __( 'Kolory', 'text_domain' ),
		'all_items'                  => __( 'Wszystkie kolory', 'text_domain' ),
		'parent_item'                => __( 'Parent Item', 'text_domain' ),
		'parent_item_colon'          => __( 'Parent Item:', 'text_domain' ),
		'new_item_name'              => __( 'Nowy kolor', 'text_domain' ),
		'add_new_item'               => __( 'Dodaj kolor', 'text_domain' ),
		'edit_item'                  => __( 'Edytuj', 'text_domain' ),
		'update_item'                => __( 'Zaktualizuj', 'text_domain' ),
		'separate_items_with_commas' => __( 'Oddziel przecinkami', 'text_domain' ),
		'search_items'               => __( 'Przeszukaj', 'text_domain' ),
		'add_or_remove_items'        => __( 'Dodaj lub usuń', 'text_domain' ),
		'choose_from_most_used'      => __( 'Wybierz z najpopularniejszych', 'text_domain' ),
		'not_found'                  => __( 'Nie znaleziono', '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,
		'update_count_callback'      => 'colors',	);
	register_taxonomy( 'color', array( 'shop' ), $args );

}

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