WordPress 6.7 introduces many exciting features, but one subtle enhancement worth noting is the stabilization of content-only editing, now ready for use by extenders and block developers.
Although content-only editing was first introduced in WordPress 6.1, supporting this mode in custom blocks previously required an experimental property in block.json
. Combined with the absence of an editor interface for applying content-only mode, it has remained one of the more overlooked and underutilized features of the block editor. But that might be changing soon.
So, if this is the first you’ve heard about content-only editing, don’t worry—you are not alone.
In this article, I’ll explain what content-only editing is, why it’s important to support it in your blocks, and how to implement it using a practical example.
Table of Contents
What is content-only editing?
Content-only editing was added to WordPress two years ago as an additional locking mechanism designed to reduce the need to create custom blocks for layouts that could alternatively be built using block patterns.
The main advantage of using a custom block is that it gives you complete control over what users can edit, such as restricting them to only editing text, images, and other content elements. This simplifies the editing experience for users while maintaining a consistent layout and enforcing design standards.
Content-only editing provides similar functionality to all blocks natively.
You enable it by adding templateLock: contentOnly
to a container block, like Group, Column, and Cover. Once active, users can only edit specific elements of the nested content. Blocks without editable content are hidden from the List View and cannot be selected. Additionally, the Settings Sidebar for all blocks is disabled.
While often applied to blocks and patterns, you can also use content-only editing to lock entire page templates. For more information, refer to the Block Templates documentation.
To demonstrate how this works, consider the following block layout, which features a Group block containing a Heading, Paragraph, and Social Icons block. Block styles and settings have been applied, and this example uses the Twenty Twenty-Five theme coming in WordPress 6.7.