• Hello,

    How can i hide the classic editor on wordpress pages? any snippet for functions.php? or plugin?

    Screenshot

    I try this but not working

    add_action( 'admin_init', 'hide_editor' );
     
    function hide_editor() {
        $post_id = $_GET['post'] ? $_GET['post'] : $_POST['post_ID'] ;
        if( !isset( $post_id ) ) return;
     
        $template_file = get_post_meta($post_id, '_wp_page_template', true);
         
        remove_post_type_support('page', 'editor'); 
    }

    Thanks.

    • This topic was modified 3 years, 3 months ago by cienfu90.
Viewing 1 replies (of 1 total)
  • Hi there

    add_action('admin_head', 'remove_content_editor');
    /**
     * Remove the content editor from ALL pages 
     */
    function remove_content_editor()
    { 
        remove_post_type_support('page', 'editor');        
    }

    add this code

    Thanks

Viewing 1 replies (of 1 total)
  • The topic ‘Hide Editor on pages’ is closed to new replies.