Make every new entry of a post type start with a fixed set of blocks, and optionally stop editors adding or removing blocks.
add_filter( 'register_post_type_args', function ( array $args, string $post_type ): array {
if ( 'post' !== $post_type ) {
return $args;
}
$args['template'] = [
[ 'core/paragraph', [ 'placeholder' => 'Summary (1–2 sentences)' ] ],
[ 'core/image', [] ],
[ 'core/heading', [ 'level' => 2, 'content' => 'Details' ] ],
[ 'core/paragraph', [ 'placeholder' => 'Write the details…' ] ],
];
// 'all' = can't add, move or remove blocks; 'insert' = can't add or remove; false = no lock.
$args['template_lock'] = false;
return $args;
}, 10, 2 );
Always add PHP to a staging site first, or have FTP or file manager access ready, so you can undo it if something goes wrong.
For structured content like team members, case studies or events, every entry should have the same parts in the same order. A block template sets that up, and template locking keeps it that way.
Post types can define a template: a list of block names and their attributes. New posts open with those blocks already in place. The register_post_type_args filter adds a template to any post type, including built-in ones like post and ones registered by plugins.
template_lock set to 'all' stops blocks being added, moved or removed; 'insert' allows moving but not adding or removing; false makes the template a starting point only.
'post' to your custom post type’s name.Create a new post. It should open with the summary paragraph, image, Details heading and paragraph.