Enable Gutenberg only for Pages

Here’s a quick way to enable Gutenberg only for pages and keep using the “Classic Editor” on other post types:

add_filter( 'gutenberg_can_edit_post_type', function ( $can_edit, $post_type ) {
    $can_edit = $post_type === 'page';

    return $can_edit;
}, 99, 2 );
Standard