0

I have created a custom post type. And on the custom post type I would like to have a featured image. I have added the featured image to my custom posts however when I do this it removes the main text editor (which you use to add copy to your website). If i remove support thumbnail it brings the text editor back.

add_action( 'init', 'create_post_type' );
function create_post_type() {
register_post_type( 'artist',
    array(
        'labels' => array(
            'name' => __( 'Talent' ),
            'singular_name' => __( 'talent' )
        ),
    'public' => true,
    'has_archive' => true,
    'supports' => array( 'thumbnail' ),
    'rewrite' => array('slug' => 'talent'),

    )
);
}
3

You need to add each individual support you need e.g.

'supports' => array('thumbnail', 'title', 'editor'),

The title and editor are added by default in a post type but if you add the supports query you need to redefine them back in.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.