How to create a Gutenberg block template

Registering Gutenberg Blocks
In the initial step we create custom blocks templates that can be used to build pre-populated blocks. Add the following code to the functions.php.

add_action( 'init', function() {
$args = array(
'public' => true,
'label' => 'News',
'show_in_rest' => true,
'template_lock' => 'all',
'template' => array(
array( 'core/paragraph', array(
'placeholder' => 'Breaking News'...

How to create a Gutenberg block template

Top News