oferta one2
// Register Custom Post Type
function cpt_oferta() {
$labels = array(
'name' => _x( 'strony oferty', 'Post Type General Name', 'text_domain' ),
'singular_name' => _x( 'strona oferty', 'Post Type Singular Name', 'text_domain' ),
'menu_name' => __( 'Oferta', 'text_domain' ),
'name_admin_bar' => __( 'Oferta', 'text_domain' ),
'archives' => __( 'Archiwa ofert', 'text_domain' ),
'parent_item_colon' => __( 'Nadrzędna oferta', 'text_domain' ),
'all_items' => __( 'Wszystkie oferty', 'text_domain' ),
'add_new_item' => __( 'Dodaj nową stronę oferty', 'text_domain' ),
'add_new' => __( 'Dodaj nową', 'text_domain' ),
'new_item' => __( 'Nowa strona oferty', 'text_domain' ),
'edit_item' => __( 'Edytuj stronę oferty', 'text_domain' ),
'update_item' => __( 'Aktualizuj stronę oferty', 'text_domain' ),
'view_item' => __( 'Zobacz stronę oferty', 'text_domain' ),
'search_items' => __( 'Szukaj strony oferty', 'text_domain' ),
'not_found' => __( 'Nie znaleziono', 'text_domain' ),
'not_found_in_trash' => __( 'Nie znaleziono w koszu', 'text_domain' ),
'featured_image' => __( 'Obrazek wyróżniający', 'text_domain' ),
'set_featured_image' => __( 'Ustaw obrazek wyróżniający', 'text_domain' ),
'remove_featured_image' => __( 'Usuń obrazek wyróżniający', 'text_domain' ),
'use_featured_image' => __( 'Użyj jako obrazka wyróżniającego', 'text_domain' ),
'insert_into_item' => __( 'Wstaw w stronę oferty', 'text_domain' ),
'uploaded_to_this_item' => __( 'Załadowano do strony oferty', 'text_domain' ),
'items_list' => __( 'Lista stron oferty', 'text_domain' ),
'items_list_navigation' => __( 'Nawigacja listy stron oferty', 'text_domain' ),
'filter_items_list' => __( 'Filtruj listę stron oferty', 'text_domain' ),
);
$rewrite = array(
'slug' => 'oferta-one2',
'with_front' => true,
'pages' => false,
'feeds' => false,
);
$args = array(
'label' => __( 'strona oferty', 'text_domain' ),
'description' => __( 'oferta', 'text_domain' ),
'labels' => $labels,
'supports' => array( 'title', 'editor', 'thumbnail', 'custom-fields', 'page-attributes', ),
'taxonomies' => array( 'category', 'post_tag' ),
'hierarchical' => true,
'public' => true,
'show_ui' => true,
'show_in_menu' => true,
'menu_position' => 20,
'menu_icon' => 'dashicons-welcome-widgets-menus',
'show_in_admin_bar' => true,
'show_in_nav_menus' => true,
'can_export' => true,
'has_archive' => false,
'exclude_from_search' => false,
'publicly_queryable' => true,
'rewrite' => $rewrite,
'capability_type' => 'page',
);
register_post_type( 'oferta', $args );
}
add_action( 'init', 'cpt_oferta', 0 );