Kategorie produktów
// Register Custom Taxonomy
function custom_taxonomy_product_cat() {
$labels = array(
'name' => _x( 'Kategorie', 'Taxonomy General Name', 'intercar' ),
'singular_name' => _x( 'Kategoria', 'Taxonomy Singular Name', 'intercar' ),
'menu_name' => __( 'Kategorie', 'intercar' ),
'all_items' => __( 'Wszystkie pozycje', 'intercar' ),
'parent_item' => __( 'Rodzic', 'intercar' ),
'parent_item_colon' => __( 'Rodzic:', 'intercar' ),
'new_item_name' => __( 'Nazwa', 'intercar' ),
'add_new_item' => __( 'Dodaj nową pozycję', 'intercar' ),
'edit_item' => __( 'Edytuj', 'intercar' ),
'update_item' => __( 'Aktualizuj', 'intercar' ),
'view_item' => __( 'Pokaż', 'intercar' ),
'separate_items_with_commas' => __( 'Oddziel przecinkami', 'intercar' ),
'add_or_remove_items' => __( 'Dodaj lub usuń', 'intercar' ),
'choose_from_most_used' => __( 'Wybierz', 'intercar' ),
'popular_items' => __( 'Popularne pozycje', 'intercar' ),
'search_items' => __( 'Szukaj', 'intercar' ),
'not_found' => __( 'Nie znaleziono', 'intercar' ),
'no_terms' => __( 'Brak pozycji', 'intercar' ),
'items_list' => __( 'Lista pozycji', 'intercar' ),
'items_list_navigation' => __( 'Nawigacja pozycji', 'intercar' ),
);
$rewrite = array(
'slug' => 'kategorie',
'with_front' => true,
'hierarchical' => false,
);
$args = array(
'labels' => $labels,
'hierarchical' => false,
'public' => true,
'show_ui' => true,
'show_admin_column' => true,
'show_in_nav_menus' => true,
'show_tagcloud' => false,
'rewrite' => $rewrite,
'show_in_rest' => false,
);
register_taxonomy( 'product_cat', array( 'product' ), $args );
}
add_action( 'init', 'custom_taxonomy_product_cat', 0 );