diff --git a/packages/block-library/src/comments-pagination-numbers/block.json b/packages/block-library/src/comments-pagination-numbers/block.json index 9e89fd6715d17..62e2f1c5945bf 100644 --- a/packages/block-library/src/comments-pagination-numbers/block.json +++ b/packages/block-library/src/comments-pagination-numbers/block.json @@ -4,7 +4,7 @@ "name": "core/comments-pagination-numbers", "title": "Comments Pagination Numbers", "category": "design", - "parent": [ "core/comments-query-loop" ], + "parent": [ "core/comments-pagination" ], "description": "Displays a list of page numbers for comments pagination.", "textdomain": "default", "usesContext": [ "queryId", "queryPerPage", "postId" ], diff --git a/packages/block-library/src/comments-pagination/edit.js b/packages/block-library/src/comments-pagination/edit.js index b75cd887b6958..bd9051e16f05d 100644 --- a/packages/block-library/src/comments-pagination/edit.js +++ b/packages/block-library/src/comments-pagination/edit.js @@ -17,6 +17,9 @@ import { PanelBody } from '@wordpress/components'; */ import { CommentsPaginationArrowControls } from './comments-pagination-arrow-controls'; +// TODO: add pagination-previous/next blocks once they are implemented. +const TEMPLATE = [ [ 'core/comments-pagination-numbers' ] ]; + const getDefaultBlockLayout = ( blockTypeOrName ) => { const layoutBlockSupportConfig = getBlockSupport( blockTypeOrName, @@ -48,6 +51,11 @@ export default function QueryPaginationEdit( { }, [] ); const blockProps = useBlockProps(); const innerBlocksProps = useInnerBlocksProps( blockProps, { + template: TEMPLATE, + allowedBlocks: [ + // TODO: add pagination-previous/next blocks once they are implemented. + 'core/comments-pagination-numbers', + ], __experimentalLayout: usedLayout, } ); return (