-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Closed
Labels
[Feature] Site EditorRelated to the overarching Site Editor (formerly "full site editing")Related to the overarching Site Editor (formerly "full site editing")[Status] In ProgressTracking issues with work in progressTracking issues with work in progress[Type] BugAn existing feature does not function as intendedAn existing feature does not function as intended
Description
Description
The initial state of a new post type is defined in WP_Post_Type->template. This initial state is acknowledged by the block editor when creating a new post/page/etc but not in the site editor.
Step-by-step reproduction instructions
- Register a post type block template for a post type that appears in the site editor. We'll use
page(but you could usewp_block). Place this in afunctions.phpor plugin file:
function myplugin_register_template() {
$post_type_object = get_post_type_object( 'page' );
$post_type_object->template = array(
array( 'core/image' ),
);
}
add_action( 'init', 'myplugin_register_template' );- Start a new page from the regular dashboard, which loads the block editor, and you'll see the initial block content (an image block) in the post content.
- Start a new page from inside the site editor - you'll see that there is no initial block content.
Screenshots, screen recording, code snippet
No response
Environment info
- WordPress 6.5.2
- Gutenberg 18.1.0
Please confirm that you have searched existing issues in the repo.
Yes
Please confirm that you have tested with all plugins deactivated except Gutenberg.
Yes
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
[Feature] Site EditorRelated to the overarching Site Editor (formerly "full site editing")Related to the overarching Site Editor (formerly "full site editing")[Status] In ProgressTracking issues with work in progressTracking issues with work in progress[Type] BugAn existing feature does not function as intendedAn existing feature does not function as intended
Type
Fields
Give feedbackNo fields configured for issues without a type.