How do I remove Editor in custom post type keeping the Add media button. When I used as following in custom post type declaration, it removes the Add Media button and I don't need editor in my post type.

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



WordPress uses the function wp_editor() and there are no parameter that will disable the textarea (what i can see). So i think that you can just hide it with some css.

function wpse_78595_hide_editor() {
    global $current_screen;

    if( $current_screen->post_type == 'custom_post_type_name' ) {
        $css = '<style type="text/css">';
            $css .= '#wp-content-editor-container, #post-status-info, .wp-switch-editor { display: none; }';
        $css .= '</style>';

        echo $css;
add_action('admin_footer', 'wpse_78595_hide_editor');
| improve this answer | |
  • I had the same situation as the OP, and also found nothing, ended up using CSS as well. – brasofilo Jan 8 '13 at 16:54

It looks like Wordpress 4.0 (or earlier) has removed the need for the editor, as I was able to easily not include it.

| improve this answer | |
  • Please edit your answer; explain how you removed the editor, while keeping the Add Media button. – Gabriel Dec 11 '14 at 8:41

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.