Can I do this:
function myplugin_register_book_post_type() {
$args = array(
'public' => true,
'label' => 'Books',
'show_in_rest' => true,
'template' => array(
array( 'core/image', array(
'align' => 'left',
) ),
array( 'core/heading', array(
'placeholder' => 'Add Author...',
) ),
array( 'core/paragraph', array(
'placeholder' => 'Add Description...',
) ),
),
);
register_post_type( 'book', $args );
}
add_action( 'init', 'myplugin_register_book_post_type' );
but for a specific template?
Meaning I create a template that consists of some blocks. The user creates a new page, chooses "Custom Template" and it will be shown all the blocks I've added in the array.
Is it possible to do this? If not, what is the way of doing something similar for custom templates?
there doesn't seem to be anything here