diff --git a/packages/edit-site/src/components/page-main/index.js b/packages/edit-site/src/components/page-main/index.js index 7cc2025ac2c941..fead1b9dbc11e0 100644 --- a/packages/edit-site/src/components/page-main/index.js +++ b/packages/edit-site/src/components/page-main/index.js @@ -20,7 +20,10 @@ export default function PageMain() { params: { path }, } = useLocation(); - if ( path === '/wp_template/all' ) { + if ( + path === '/wp_template/all' || + ( path === '/wp_template' && window?.__experimentalAdminViews ) + ) { return ; } else if ( path === '/wp_template_part/all' ) { return ; diff --git a/packages/edit-site/src/utils/get-is-list-page.js b/packages/edit-site/src/utils/get-is-list-page.js index 9530cd85bf04b4..3028b0e65d786e 100644 --- a/packages/edit-site/src/utils/get-is-list-page.js +++ b/packages/edit-site/src/utils/get-is-list-page.js @@ -16,6 +16,7 @@ export default function getIsListPage( return ( [ '/wp_template/all', '/wp_template_part/all' ].includes( path ) || ( path === '/page' && window?.__experimentalAdminViews ) || + ( path === '/wp_template' && window?.__experimentalAdminViews ) || ( path === '/patterns' && // Don't treat "/patterns" without categoryType and categoryId as a // list page in mobile because the sidebar covers the whole page.