diff --git a/packages/block-library/src/page-list/edit.js b/packages/block-library/src/page-list/edit.js index 9440b08aad3ce6..6433926b73d6fa 100644 --- a/packages/block-library/src/page-list/edit.js +++ b/packages/block-library/src/page-list/edit.js @@ -103,6 +103,14 @@ export default function PageListEdit( { context, clientId } ) { function useFrontPageId() { return useSelect( ( select ) => { + const canReadSettings = select( coreStore ).canUser( + 'read', + 'settings' + ); + if ( ! canReadSettings ) { + return undefined; + } + const site = select( coreStore ).getEntityRecord( 'root', 'site' ); return site?.show_on_front === 'page' && site?.page_on_front; }, [] ); @@ -117,6 +125,7 @@ function usePageData() { order: 'asc', _fields: [ 'id', 'link', 'parent', 'title', 'menu_order' ], per_page: -1, + context: 'view', } );