When I create a custom post type, all posts dissapear

I’m using my own theme and I’m facing a issue: when I create a custom post type, all posts and pages “dissapear” – they’re there, but I can’t edit them, etc. Someone knows why this happens? Screenshot:

My custom post type code (functions.php):

function profissoes_post_type() {

	$labels = array(
		'name'                  => _x( 'Profissões', 'Post Type General Name', 'empregalia' ),
		'singular_name'         => _x( 'Profissão', 'Post Type Singular Name', 'empregalia' ),
		'menu_name'             => __( 'Profissões', 'empregalia' ),
		'name_admin_bar'        => __( 'Profissões', 'empregalia' ),
		'archives'              => __( 'Item Archives', 'empregalia' ),
		'attributes'            => __( 'Item Attributes', 'empregalia' ),
		'parent_item_colon'     => __( 'Parent Item:', 'empregalia' ),
		'all_items'             => __( 'All Items', 'empregalia' ),
		'add_new_item'          => __( 'Add New Item', 'empregalia' ),
		'add_new'               => __( 'Add New', 'empregalia' ),
		'new_item'              => __( 'New Item', 'empregalia' ),
		'edit_item'             => __( 'Edit Item', 'empregalia' ),
		'update_item'           => __( 'Update Item', 'empregalia' ),
		'view_item'             => __( 'View Item', 'empregalia' ),
		'view_items'            => __( 'View Items', 'empregalia' ),
		'search_items'          => __( 'Search Item', 'empregalia' ),
		'not_found'             => __( 'Not found', 'empregalia' ),
		'not_found_in_trash'    => __( 'Not found in Trash', 'empregalia' ),
		'featured_image'        => __( 'Featured Image', 'empregalia' ),
		'set_featured_image'    => __( 'Set featured image', 'empregalia' ),
		'remove_featured_image' => __( 'Remove featured image', 'empregalia' ),
		'use_featured_image'    => __( 'Use as featured image', 'empregalia' ),
		'insert_into_item'      => __( 'Insert into item', 'empregalia' ),
		'uploaded_to_this_item' => __( 'Uploaded to this item', 'empregalia' ),
		'items_list'            => __( 'Items list', 'empregalia' ),
		'items_list_navigation' => __( 'Items list navigation', 'empregalia' ),
		'filter_items_list'     => __( 'Filter items list', 'empregalia' ),
	);
	$rewrite = array(
		'slug'                  => 'profissoes',
		'with_front'            => true,
		'pages'                 => true,
		'feeds'                 => true,
	);
	$args = array(
		'label'                 => __( 'Profissão', 'empregalia' ),
		'description'           => __( 'Post Type Description', 'empregalia' ),
		'labels'                => $labels,
		'supports'              => array( 'title', 'editor', 'thumbnail', 'custom-fields', 'page-attributes', 'post-formats' ),
		'taxonomies'            => array( 'category', 'post_tag' ),
		'hierarchical'          => true,
		'public'                => true,
		'show_ui'               => true,
		'show_in_menu'          => true,
		'menu_position'         => 5,
		'menu_icon'             => 'dashicons-admin-tools',
		'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( 'post_type', $args );

}
add_action( 'init', 'profissoes_post_type', 0 );

The page I need help with: [log in to see the link]

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer