How to hide edotor in WorPress admin page

// Remove WordPress editor admin page for template page
function remove_wp_editor() {
    if ( isset( $_GET['post'] ) ) {
        $id = $_GET['post'];
        $my_template = get_post_meta($id, '_wp_page_template', true );
        if( $my_template == 'template-page.php') { 
            remove_post_type_support( 'page', 'editor' );
        }
    }
}
add_action('admin_init', 'remove_wp_editor');


// Remove WordPress editor admin page for all pages
function remove_wp_editor() {
    if ( isset( $_GET['post'] ) ) {
        $id = $_GET['post'];
            remove_post_type_support( 'page', 'editor' );
}
add_action('admin_init', 'remove_wp_editor');

Leave a Reply