Can I remove the Rich Text box editor for a specific post?

There is an add_meta_boxes function that fires that you can hook into – it fires whenever the edit post page is rendered.

At that point, you can get the ID of the post being edited using get_the_ID(). You can then compare it to the ID for which you want to remove the post editor:

function remove_pages_editor(){
    if(get_the_ID() == 23) {
        remove_post_type_support( 'post', 'editor' );
    } // end if
} // end remove_pages_editor
add_action( 'add_meta_boxes', 'remove_pages_editor' );

Leave a Comment