Piloter – custom post type
// Register Custom Post Type
function post_type_piloter() {
$labels = array(
'name' => 'Piloter',
'singular_name' => 'Pilot',
'menu_name' => 'Piloter',
'name_admin_bar' => 'Pilot',
'archives' => 'Piloter arkiver',
'attributes' => 'Item Attributes',
'parent_item_colon' => 'Parent Item:',
'all_items' => 'Alle piloter',
'add_new_item' => 'Legg til pilot',
'add_new' => 'Ny pilot',
'new_item' => 'Ny pilot',
'edit_item' => 'Rediger pilot',
'update_item' => 'Oppdater pilot',
'view_item' => 'Se pilot',
'view_items' => 'Se piloter',
'search_items' => 'Søk i piloter',
'not_found' => 'Ikke funnet',
'not_found_in_trash' => 'Ikke funnet i søppelkassen',
'featured_image' => 'Fremhevet bilde',
'set_featured_image' => 'Angi fremhevet bilde',
'remove_featured_image' => 'Fjern fremhevet bilde',
'use_featured_image' => 'Bruk som fremhevet bilde',
'insert_into_item' => 'Sett inn i pilot',
'uploaded_to_this_item' => 'Lastet opp til dette elementet',
'items_list' => 'Piloter',
'items_list_navigation' => 'Items list navigation',
'filter_items_list' => 'Filter items list',
);
$args = array(
'label' => 'Pilot',
'description' => 'Jobbvinner-piloter',
'labels' => $labels,
'supports' => array( 'title', 'editor', 'thumbnail' ),
'taxonomies' => array( 'post_tag' ),
'hierarchical' => false,
'public' => true,
'show_ui' => true,
'show_in_menu' => true,
'menu_position' => 10,
'menu_icon' => 'dashicons-location',
'show_in_admin_bar' => true,
'show_in_nav_menus' => true,
'can_export' => true,
'has_archive' => false,
'exclude_from_search' => false,
'publicly_queryable' => true,
'capability_type' => 'post',
'show_in_rest' => true,
);
register_post_type( 'pilot', $args );
}
add_action( 'init', 'post_type_piloter', 0 );