Subscribe to Our Mailing List and Stay Up-to-Date! Subscribe

WordPress Block Templates: Streamline Content Creation Workflows

Block templates revolutionize WordPress content workflows by pre-defining block structures for posts, pages, and custom post types. Instead of starting with a blank canvas, content creators begin with purposefully designed templates that ensure consistency and accelerate publishing.

What Are Block Templates?

Block templates define the initial block structure when creating new content. They’re pre-configured block arrangements that appear when you create a new post, page, or custom post type entry.

Think of block templates as blueprints. When creating a new “Product” post, a template might automatically include an image block, heading, price field, description paragraphs, and feature list—everything needed for consistent product pages.

Benefits of Block Templates

Block templates deliver measurable workflow improvements:

Consistency – Every post type follows the same structure, maintaining brand standards across all content. New team members create properly formatted content from day one.

Speed – Content creators spend zero time setting up block structure. They focus entirely on writing content, not arranging blocks.

Guidance – Templates with placeholder text guide creators on what content goes where, reducing questions and revisions.

Quality control – Required blocks ensure essential content never gets forgotten. Product pages always include images, pricing, and descriptions.

Templates vs Patterns vs Reusable Blocks

Understanding the differences helps you choose the right tool:

Block templates apply automatically when creating new content. Users can modify or remove blocks as needed.

Block patterns are insertable block arrangements available from the inserter. Users manually add them to content.

Reusable blocks are synced content that updates across all instances. Changes propagate everywhere the block appears.

Use templates for automatic post structure, patterns for optional insertable layouts, and reusable blocks for synchronized content.

Creating Block Templates for Custom Post Types

Register block templates when defining custom post types:

function dprt_register_product_post_type() {
    $template = array(
        array( 'core/image', array(
            'placeholder' => 'Add product image',
            'align' => 'wide'
        ) ),
        array( 'core/heading', array(
            'placeholder' => 'Product Name',
            'level' => 2
        ) ),
        array( 'core/paragraph', array(
            'placeholder' => 'Enter product description...'
        ) ),
        array( 'core/columns', array(), array(
            array( 'core/column', array(), array(
                array( 'core/heading', array(
                    'content' => 'Features',
                    'level' => 3
                ) ),
                array( 'core/list' )
            ) ),
            array( 'core/column', array(), array(
                array( 'core/heading', array(
                    'content' => 'Specifications',
                    'level' => 3
                ) ),
                array( 'core/list' )
            ) )
        ) ),
        array( 'core/buttons' )
    );

    register_post_type( 'product', array(
        'labels' => array(
            'name' => 'Products'
        ),
        'public' => true,
        'template' => $template,
        'template_lock' => 'all',
        'supports' => array( 'title', 'editor', 'thumbnail' )
    ) );
}
add_action( 'init', 'dprt_register_product_post_type' );

This template ensures every product post starts with the same structure.

Template Locking Options

Control how users can modify templates with the template_lock argument:

‘all’ – Users cannot add, remove, or move blocks. They can only edit existing block content. Perfect for strict templates where structure must never change.

‘insert’ – Users can edit and move blocks but cannot add new ones. Maintains intended block set while allowing reorganization.

‘contentOnly’ – Users can only edit text content. Block settings and structure are locked. Ideal for non-technical users.

false (default) – No restrictions. Users have complete freedom to modify the template.

Choose based on your workflow requirements and user technical level.

Nested Block Templates

Templates support complex nested structures:

$template = array(
    array( 'core/group', array(
        'className' => 'product-header'
    ), array(
        array( 'core/columns', array(), array(
            array( 'core/column', array( 'width' => '66.66%' ), array(
                array( 'core/heading', array(
                    'placeholder' => 'Product Title'
                ) ),
                array( 'core/paragraph', array(
                    'placeholder' => 'Short description'
                ) )
            ) ),
            array( 'core/column', array( 'width' => '33.33%' ), array(
                array( 'core/image' )
            ) )
        ) )
    ) ),
    array( 'core/separator' ),
    array( 'core/heading', array(
        'content' => 'Product Details',
        'level' => 2
    ) )
);

The nested array structure mirrors block hierarchy, with each nested array representing child blocks.

Template Syntax Explained

Each block in the template array follows this structure:

array(
    'block-name',           // Required: full block name
    array(                  // Optional: block attributes
        'placeholder' => 'text',
        'className' => 'custom-class',
        'align' => 'wide'
    ),
    array(                  // Optional: inner blocks
        // Nested block arrays
    )
)

The first element is the block name. The second element sets default attributes. The third element contains child blocks.

FSE Block Templates

Full Site Editing uses block templates for entire page structures. Create HTML template files in your theme’s /templates directory:

<!-- wp:template-part {"slug":"header"} /-->

<!-- wp:group {"layout":{"type":"constrained"}} -->
<div class="wp-block-group">
    <!-- wp:post-title /-->
    <!-- wp:post-featured-image /-->
    <!-- wp:post-content /-->
</div>
<!-- /wp:group -->

<!-- wp:template-part {"slug":"footer"} /-->

This single.html template defines the structure for single post pages in block themes.

Template Parts

Template parts are reusable sections like headers and footers. Create them in /parts:

<!-- wp:group {"layout":{"type":"flex","justifyContent":"space-between"}} -->
<div class="wp-block-group">
    <!-- wp:site-logo /-->
    <!-- wp:navigation /-->
</div>
<!-- /wp:group -->

Save as header.html and reference it in templates with <!-- wp:template-part {"slug":"header"} /-->.

Real-World Template Examples

Case Study Template:

$case_study_template = array(
    array( 'core/heading', array( 'placeholder' => 'Client Name', 'level' => 1 ) ),
    array( 'core/paragraph', array( 'placeholder' => 'Industry and project overview' ) ),
    array( 'core/heading', array( 'content' => 'Challenge', 'level' => 2 ) ),
    array( 'core/paragraph' ),
    array( 'core/heading', array( 'content' => 'Solution', 'level' => 2 ) ),
    array( 'core/paragraph' ),
    array( 'core/heading', array( 'content' => 'Results', 'level' => 2 ) ),
    array( 'core/list' ),
    array( 'core/quote', array( 'placeholder' => 'Client testimonial' ) )
);

Team Member Template:

$team_template = array(
    array( 'core/image', array( 'align' => 'center' ) ),
    array( 'core/heading', array( 'placeholder' => 'Full Name', 'level' => 2, 'textAlign' => 'center' ) ),
    array( 'core/paragraph', array( 'placeholder' => 'Job Title', 'align' => 'center', 'className' => 'job-title' ) ),
    array( 'core/paragraph', array( 'placeholder' => 'Bio' ) ),
    array( 'core/social-links' )
);

Training Users on Templates

Document your templates for content creators:

  1. Create a style guide explaining each template’s purpose
  2. Include screenshots showing completed examples
  3. Explain which blocks are required vs optional
  4. Demonstrate how to use placeholder text
  5. Show what they can and cannot modify based on locking

Good documentation reduces support requests and improves content quality.

Testing Templates

Test templates across scenarios:

  • Create new posts to verify template loads correctly
  • Test with different user roles to ensure permissions work
  • Verify locked templates prevent unwanted modifications
  • Check mobile responsiveness of template structure
  • Test template migration if updating WordPress versions

Conclusion

Block templates transform chaotic content workflows into structured, efficient processes. Define templates for custom post types, use appropriate template locking, and train your team. The initial setup investment pays dividends through faster publishing, consistent quality, and reduced revision cycles.

  1. Block Templates Documentation
  2. Full Site Editing Guide
  3. Template Locking
  4. Theme.json Reference
  5. Block Template Parts

Call to Action

Streamline your workflow! Block Editor Navigator Pro provides instant block navigation, search, and organization. Find any block in seconds—try it free!