Skip to content

Commit

Permalink
Remove metaboxes from template mode (#32315)
Browse files Browse the repository at this point in the history
  • Loading branch information
youknowriad authored May 28, 2021
1 parent 53596f0 commit cae7749
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions packages/edit-post/src/components/layout/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,11 @@ function Layout( { styles } ) {
showIconLabels,
hasReducedUI,
showBlockBreadcrumbs,
isTemplateMode,
} = useSelect( ( select ) => {
const editorSettings = select( editorStore ).getEditorSettings();
return {
isTemplateMode: select( editPostStore ).isEditingTemplate(),
hasFixedToolbar: select( editPostStore ).isFeatureActive(
'fixedToolbar'
),
Expand Down Expand Up @@ -227,10 +229,12 @@ function Layout( { styles } ) {
{ isRichEditingEnabled && mode === 'visual' && (
<VisualEditor styles={ styles } />
) }
<div className="edit-post-layout__metaboxes">
<MetaBoxes location="normal" />
<MetaBoxes location="advanced" />
</div>
{ ! isTemplateMode && (
<div className="edit-post-layout__metaboxes">
<MetaBoxes location="normal" />
<MetaBoxes location="advanced" />
</div>
) }
{ isMobileViewport && sidebarIsOpened && (
<ScrollLock />
) }
Expand Down

0 comments on commit cae7749

Please sign in to comment.