Okay, I'm well aware this thread is old as hell, but in the off chance some other poor soul is running into a similar issue that Travis Hoki described above, here's what Nozifel was referring to in context:
<?php
/**
* Registers the `fake_post_type` post type.
*/
function fake_post_type_init() {
register_post_type( 'fake-post-type', array(
'labels' => array(
'name' => __( 'Fake post types', 'YOUR-TEXTDOMAIN' ),
'singular_name' => __( 'Fake post type', 'YOUR-TEXTDOMAIN' ),
'all_items' => __( 'All Fake post types', 'YOUR-TEXTDOMAIN' ),
'archives' => __( 'Fake post type Archives', 'YOUR-TEXTDOMAIN' ),
'attributes' => __( 'Fake post type Attributes', 'YOUR-TEXTDOMAIN' ),
'insert_into_item' => __( 'Insert into fake post type', 'YOUR-TEXTDOMAIN' ),
'uploaded_to_this_item' => __( 'Uploaded to this fake post type', 'YOUR-TEXTDOMAIN' ),
'featured_image' => _x( 'Featured Image', 'fake-post-type', 'YOUR-TEXTDOMAIN' ),
'set_featured_image' => _x( 'Set featured image', 'fake-post-type', 'YOUR-TEXTDOMAIN' ),
'remove_featured_image' => _x( 'Remove featured image', 'fake-post-type', 'YOUR-TEXTDOMAIN' ),
'use_featured_image' => _x( 'Use as featured image', 'fake-post-type', 'YOUR-TEXTDOMAIN' ),
'filter_items_list' => __( 'Filter fake post types list', 'YOUR-TEXTDOMAIN' ),
'items_list_navigation' => __( 'Fake post types list navigation', 'YOUR-TEXTDOMAIN' ),
'items_list' => __( 'Fake post types list', 'YOUR-TEXTDOMAIN' ),
'new_item' => __( 'New Fake post type', 'YOUR-TEXTDOMAIN' ),
'add_new' => __( 'Add New', 'YOUR-TEXTDOMAIN' ),
'add_new_item' => __( 'Add New Fake post type', 'YOUR-TEXTDOMAIN' ),
'edit_item' => __( 'Edit Fake post type', 'YOUR-TEXTDOMAIN' ),
'view_item' => __( 'View Fake post type', 'YOUR-TEXTDOMAIN' ),
'view_items' => __( 'View Fake post types', 'YOUR-TEXTDOMAIN' ),
'search_items' => __( 'Search fake post types', 'YOUR-TEXTDOMAIN' ),
'not_found' => __( 'No fake post types found', 'YOUR-TEXTDOMAIN' ),
'not_found_in_trash' => __( 'No fake post types found in trash', 'YOUR-TEXTDOMAIN' ),
'parent_item_colon' => __( 'Parent Fake post type:', 'YOUR-TEXTDOMAIN' ),
'menu_name' => __( 'Fake post types', 'YOUR-TEXTDOMAIN' ),
),
'public' => true,
'hierarchical' => false,
'show_ui' => true,
'show_in_nav_menus' => true,
'supports' => array( 'title', 'editor' ),
'has_archive' => true,
'rewrite' => [ 'slug' => '/' ], // <-- RIGHT HERE!
'query_var' => true,
'menu_position' => null,
'menu_icon' => 'dashicons-admin-post',
'show_in_rest' => true,
'rest_base' => 'fake-post-type',
'rest_controller_class' => 'WP_REST_Posts_Controller',
) );
}
add_action( 'init', 'fake_post_type_init' );