cpt oferty pracy
if ( ! function_exists('oferty_pracy_cpt') ) {
// Register Custom Post Type
function oferty_pracy_cpt() {
$labels = array(
'name' => _x( 'Oferty pracy', 'Post Type General Name', 'rd' ),
'singular_name' => _x( 'Oferta pracy', 'Post Type Singular Name', 'rd' ),
'menu_name' => __( 'Oferty pracy', 'rd' ),
'name_admin_bar' => __( 'Oferty pracy', 'rd' ),
'archives' => __( 'Archiwa ofert', 'rd' ),
'parent_item_colon' => __( 'Nadrzędna oferta', 'rd' ),
'all_items' => __( 'Wszystkie oferty', 'rd' ),
'add_new_item' => __( 'Dodaj nową ofertę', 'rd' ),
'add_new' => __( 'Dodaj nową', 'rd' ),
'new_item' => __( 'Nowa oferta', 'rd' ),
'edit_item' => __( 'Edytuj ofertę', 'rd' ),
'update_item' => __( 'Aktualizuj ofertę', 'rd' ),
'view_item' => __( 'Zobacz ofertę', 'rd' ),
'search_items' => __( 'Szukaj oferty', 'rd' ),
'not_found' => __( 'Nie znaleziono', 'rd' ),
'not_found_in_trash' => __( 'Nie znaleziono w koszu', 'rd' ),
'featured_image' => __( 'Featured Image', 'rd' ),
'set_featured_image' => __( 'Set featured image', 'rd' ),
'remove_featured_image' => __( 'Remove featured image', 'rd' ),
'use_featured_image' => __( 'Use as featured image', 'rd' ),
'insert_into_item' => __( 'Wstaw w ofertę', 'rd' ),
'uploaded_to_this_item' => __( 'Załadowano do oferty', 'rd' ),
'items_list' => __( 'Lista ofert', 'rd' ),
'items_list_navigation' => __( 'Nawigacja listy ofert', 'rd' ),
'filter_items_list' => __( 'Filtruj listę ofert', 'rd' ),
);
$rewrite = array(
'slug' => 'oferty-pracy',
'with_front' => true,
'pages' => false,
'feeds' => true,
);
$args = array(
'label' => __( 'Oferta pracy', 'rd' ),
'description' => __( 'Oferty pracy', 'rd' ),
'labels' => $labels,
'supports' => array( 'title', 'editor', 'excerpt', ),
'taxonomies' => array( 'miejsce_pracy' ),
'hierarchical' => false,
'public' => true,
'show_ui' => true,
'show_in_menu' => true,
'menu_position' => 25,
'menu_icon' => 'dashicons-portfolio',
'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' => 'post',
);
register_post_type( 'oferta_pracy', $args );
}
add_action( 'init', 'oferty_pracy_cpt', 0 );
}