0

How can I remove the rich text box editor in WordPress? I have used the remove_meta_box function specifying the boxes ID, but it does not work like it does for other core meta boxes:

The code I tried:

function remove_rich_box()
{
    remove_meta_box('postdivrich', 'client', 'normal');  
}
add_action( 'do_meta_boxes', 'remove_rich_box' );

Where the second paratmeter "client" is my custom post type.

1 Answer 1

2

Unfortunately, it's not possible to remove it like a metabox, since it isn't one.

However, there's a very easy way to get rid of it for a custom post type. If you don't define anything for the 'supports' argument in the registration function, your post type will default to

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

To stop that, add this to your registration arguments array:

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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