gkt-продукти
// Register Custom Post Type
function add_products_cpt() {
$labels = array(
'name' => 'Продукти',
'singular_name' => 'Продукт',
'menu_name' => 'Продукти',
'name_admin_bar' => 'Продукти',
'parent_item_colon' => 'Продукт',
'all_items' => 'Всі продукти',
'add_new_item' => 'Додати продукт',
'add_new' => 'Додати нового',
'new_item' => 'Новий продукт',
'edit_item' => 'Редагувати',
'update_item' => 'Оновити',
'view_item' => 'Переглянути',
'search_items' => 'Знайти',
'not_found' => 'Не знайдено',
'not_found_in_trash' => 'Не знайдено в Кошику',
);
$args = array(
'label' => 'Продукт',
'description' => 'Продукти',
'labels' => $labels,
'supports' => array( 'title', 'editor', 'excerpt', 'author', 'revisions', ),
'taxonomies' => array( 'category' ),
'hierarchical' => false,
'public' => true,
'show_ui' => true,
'show_in_menu' => true,
'menu_position' => 5,
'menu_icon' => ' dashicons-feedback',
'show_in_admin_bar' => true,
'show_in_nav_menus' => true,
'can_export' => true,
'has_archive' => true,
'exclude_from_search' => false,
'publicly_queryable' => true,
'capability_type' => 'page',
);
register_post_type( 'product', $args );
}
add_action( 'init', 'add_products_cpt', 0 );