add_action( 'init', function () {
$post_type_object = get_post_type_object( 'post' );
$post_type_object->template = [
[
'core/group',
[
'align' => 'left',
'className' => 'post-content',
'metadata' => [ 'name' => 'Post Content' ],
'layout' => [
'type' => 'constrained',
'contentSize' => '1140px',
'wideSize' => '1140px',
'inherit' => true,
'justifyContent' => 'center',
],
],
],
];
}, 20 );
There shouldn't be anything except the template content.
There is an empty paragraph block before the template.
Prerequisites
Please give us a description of what happened
When creating a new post that has a block template registered on the post type, Yoast SEO's AI Content Planner inserts an empty
core/paragraphblock at index0. That block is saved with the post and appears before the template blocks.Step-by-step reproduction instructions
Steps to reproduce
postpost type.Expected results
There shouldn't be anything except the template content.
Actual results
There is an empty paragraph block before the template.
Screenshots, screen recording, code snippet
No response
Which editor is affected (or editors)
Which browser is affected (or browsers)
Device you are using
No response
Operating system
No response
PHP version
No response
WordPress version
7.0
WordPress Theme
No response
Yoast SEO version
27.9
Gutenberg plugin version (if relevant)
No response
Elementor plugin version (if relevant)
No response
Classic Editor plugin version (if relevant)
No response
Relevant plugins in case of a bug
No response