$path ) { if ( is_string( $path ) && str_starts_with( $path, '/?_fields=' ) ) { // Replace with the complete fields list to ensure exact match. $paths[ $key ] = '/?_fields=' . $root_fields; break; } } return $paths; } add_filter( 'block_editor_rest_api_preload_paths', 'gutenberg_block_editor_preload_paths_root_fields' );