Custom HTML block embeds editable inner blocks; variations get templates
In WordPress 7.1, the Custom HTML block supports interleaving static HTML with regular, editable blocks (79115):
<!-- wp:html -->
<div class="banner"><h1>Static heading</h1><!-- wp:paragraph -->
<p>Editable paragraph</p>
<!-- /wp:paragraph --><footer>Static footer</footer></div>
<!-- /wp:html -->
In the editor, the static markup renders inert while the inner blocks are editable in place — but locked: they can’t be moved, removed, or have siblings added. The surrounding structure stays intact. The full markup remains accessible in the “Edit HTML” modal, and serialization round-trips unchanged, so existing content is unaffected.
This also makes block markup a friendlier target for AI tools: a model can generate one Custom HTML block mixing arbitrary markup with editable slots — no custom block, no build step — and the output is immediately safe to edit.
Registering variations as “higher level blocks”
Block variations now accept an innerContent field (79659): an array of static HTML fragments where each null marks the position of the corresponding innerBlocks entry. This lets you ship a fixed markup shell with editable slots as its own inserter item — no custom block needed:
wp.blocks.registerBlockVariation( 'core/html', {
name: 'testimonial-card',
title: 'Testimonial Card',
icon: 'format-quote',
innerContent: [ '<div class="testimonial-card">', null, '</div>' ],
innerBlocks: [
[ 'core/paragraph', { content: 'An inspiring quote.' } ],
],
} );
Inserting the variation produces a Custom HTML block with the preset structure and an editable paragraph inside it. Unlike a pattern, the user can edit only the designated slots, not the structure.
innerContent only applies to core/html variations; it is ignored elsewhere.
Fetched July 23, 2026


