From b94e30995b08639885bffd037e28dc189b707ccf Mon Sep 17 00:00:00 2001 From: Riad Benguella Date: Fri, 15 Nov 2024 10:04:22 +0100 Subject: [PATCH] Fix root post loading --- packages/editor/src/components/provider/index.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/packages/editor/src/components/provider/index.js b/packages/editor/src/components/provider/index.js index 5c7a2c9a65a95..14f9c2dc7929f 100644 --- a/packages/editor/src/components/provider/index.js +++ b/packages/editor/src/components/provider/index.js @@ -72,8 +72,7 @@ const NON_CONTEXTUAL_POST_TYPES = [ * @return {Array} Block editor props. */ function useBlockEditorProps( post, template, mode ) { - const rootLevelPost = - mode === 'post-only' || ! template ? 'post' : 'template'; + const rootLevelPost = mode === 'template-locked' ? 'template' : 'post'; const [ postBlocks, onInput, onChange ] = useEntityBlockEditor( 'postType', post.type,