How would you hide a textarea field.wp-editor-area at a particular page professionals?

Good day!

There is a page with ID=5. Created it for their own metaboxes (a lot). Tell me, how gracefully you can hide a standard field editor (the textarea.wp-editor-area), so it was not loose.
I certainly understand that is possible with CSS - hidden, but I want the roots.
We need to do it in PHP.

Thank you for the tips!
June 5th 19 at 21:32
1 answer
June 5th 19 at 21:34
Solution
Good.

add_action('admin_head', 'hide_editor');

hide_editor function() {
 global $pagenow;
 $post_id = $_GET['post'];

 if ('post.php' != $pagenow || !$post_id) {
return;
}

 if ($post_id == '2011') {
 remove_post_type_support('page', 'editor');
}
}

Find more questions by tags WordPress