Bobiler
// Register Custom Post Type
function post_type_vehicles() {
$labels = array(
'name' => 'Vehicles',
'singular_name' => 'Vehicle',
'menu_name' => 'Vehicles',
'name_admin_bar' => 'Vehicle',
'archives' => 'Vehicles archives',
'attributes' => 'Item Attributes',
'parent_item_colon' => 'Parent Item:',
'all_items' => 'All vehicles',
'add_new_item' => 'Add new vehicle',
'add_new' => 'Add new vehicle',
'new_item' => 'New vehicle',
'edit_item' => 'Edit vehicle',
'update_item' => 'Update vehicle',
'view_item' => 'View vehicle',
'view_items' => 'View vehicles',
'search_items' => 'Search vehicles',
'not_found' => 'Not found',
'not_found_in_trash' => 'Not Found in Trash',
'featured_image' => 'Featured Image',
'set_featured_image' => 'Set featured image',
'remove_featured_image' => 'Remove featured image',
'use_featured_image' => 'Use as featured image',
'insert_into_item' => 'Insert into vehicle',
'uploaded_to_this_item' => 'Uploaded to this vehicle',
'items_list' => 'Vehicles',
'items_list_navigation' => 'Vehicles navigation',
'filter_items_list' => 'Filter vehicles list',
);
$args = array(
'label' => 'Vehicle',
'description' => 'post type for vehicles',
'labels' => $labels,
'supports' => array( 'title', 'editor', 'thumbnail', 'custom-fields' ),
'taxonomies' => array( 'brand', ' category', ' location' ),
'hierarchical' => false,
'public' => true,
'show_ui' => true,
'show_in_menu' => true,
'menu_position' => 10,
'menu_icon' => 'dashicons-book',
'show_in_admin_bar' => true,
'show_in_nav_menus' => true,
'can_export' => true,
'has_archive' => 'Bobiler',
'exclude_from_search' => false,
'publicly_queryable' => true,
'capability_type' => 'post',
'show_in_rest' => true,
);
register_post_type( 'vehicle', $args );
}
add_action( 'init', 'post_type_vehicles', 0 );