// Register Custom Post Type function oferta_post() { $labels = array( 'name' => _x( 'Oferty', 'Post Type General Name', 'text_domain' ), 'singular_name' => _x( 'Oferta', 'Post Type Singular Name', 'text_domain' ), 'menu_name' => __( 'Oferta', 'text_domain' ), 'name_admin_bar' => __( 'Oferta', 'text_domain' ), 'archives' => __( 'Archiwum', 'text_domain' ), 'attributes' => __( 'Archiwum ofert', 'text_domain' ), 'parent_item_colon' => __( 'Nadrzędny:', 'text_domain' ), 'all_items' => __( 'Wszystkie oferty', 'text_domain' ), 'add_new_item' => __( 'Dodaj nową ofertę', 'text_domain' ), 'add_new' => __( 'Dodaj ofertę', 'text_domain' ), 'new_item' => __( 'Nowy oferta', 'text_domain' ), 'edit_item' => __( 'Edytuj ofertę', 'text_domain' ), 'update_item' => __( 'Aktualizuj ofertę', 'text_domain' ), 'view_item' => __( 'Zobacz ofertę', 'text_domain' ), 'view_items' => __( 'Zobacz ofertę', 'text_domain' ), 'search_items' => __( 'Szukaj', 'text_domain' ), 'not_found' => __( 'Nie znaleziono', 'text_domain' ), 'not_found_in_trash' => __( 'Nie znaleziono w koszu', 'text_domain' ), 'featured_image' => __( 'Zdjęcie główne', 'text_domain' ), 'set_featured_image' => __( 'Ustaw zdjęcie główne', 'text_domain' ), 'remove_featured_image' => __( 'Usuń zdjęcie główne', 'text_domain' ), 'use_featured_image' => __( 'Użyj jako główne', 'text_domain' ), 'insert_into_item' => __( 'Wstaw do wpisu', 'text_domain' ), 'uploaded_to_this_item' => __( 'Załaduj do wpisu', 'text_domain' ), 'items_list' => __( 'Lista ofert', 'text_domain' ), 'items_list_navigation' => __( 'Lista ofert w nawigacji', 'text_domain' ), 'filter_items_list' => __( 'Filtrowanie ofert', 'text_domain' ), ); $rewrite = array( 'slug' => 'oferta', 'with_front' => true, 'pages' => true, 'feeds' => true, ); $args = array( 'label' => __( 'Oferta', 'text_domain' ), 'description' => __( 'Zarządzanie ofertami', 'text_domain' ), 'labels' => $labels, 'supports' => array( 'title', 'editor', 'thumbnail', 'custom-fields', 'page-attributes' ), 'taxonomies' => array( 'category', 'tag' ), 'hierarchical' => false, 'public' => true, 'show_ui' => true, 'show_in_menu' => true, 'menu_position' => 5, 'show_in_admin_bar' => true, 'show_in_nav_menus' => true, 'can_export' => true, 'has_archive' => true, 'exclude_from_search' => false, 'publicly_queryable' => true, 'rewrite' => $rewrite, 'capability_type' => 'page', ); register_post_type( 'oferta', $args ); } add_action( 'init', 'oferta_post', 0 );