I made a custom post type "Dream". Here is the code:
//Add custom post type by Akash
add_action( 'init', 'create_post_type');
function create_post_type() {
register_post_type(
'dream',
array(
'labels' => array(
'name' => __( 'Dreams' ),
'singular_name' => __( 'Dream' )
),
'taxonomies' => array('category', 'post_tag'),
'capability_type' => 'post',
'map_meta_cap' => true,
'hierarchical' => false,
'rewrite' => array('slug' => 'Dreams'),
'query_var' => false,
'delete_with_user' => true,
'supports' => array(
'title', 'editor', 'author', 'thumbnail',
'excerpt', 'trackbacks', 'custom-fields',
'comments', 'revisions', 'post-formats'
),
'public' => true,
'has_archive' => true
)
);
}
When I try to add the CPT "Dream" as Admin, it shows the featured image block to add media, but when I try to do same thing as Author, the featured image block is not shown. How do I solve this?