Create New Item
Item Type
File
Folder
Item Name
Search file in folder and subfolders...
Are you sure want to rename?
optometrists
/
cache
/
cache
/
cache
/
cache
/
cache
/
cache
/
cache
/
.wp-cli
/
wp-content
/
plugins
/
revslider
/
includes
/
gutenberg-blocks
/
lib
:
block-templates.php
Advanced Search
Upload
New Item
Settings
Back
Back Up
Advanced Editor
Save
<?php namespace Gutenberg_Courses\Example_Blocks; //add_filter( 'register_post_type_args', __NAMESPACE__ . '\add_template_to_post_type', 20, 2 ); function add_template_to_post_type( $args, $post_type ) { if ( 'post' !== $post_type ) { return $args; } $args['template_lock'] = true; $args['template'] = [ [ 'core/image', [ 'align' => 'left', ], ], [ 'core/paragraph', [ 'placeholder' => 'The only thing you can add', ], ], ]; return $args; }