ACF Block Architecture: Blocks Editors Can Use Without Breaking the Page

A small ACF Pro block library lets clients edit everything without breaking anything: block.json, field naming, version control and limits.
In Short
- An ACF block is a Gutenberg block whose fields are defined with Advanced Custom Fields Pro and whose markup is a PHP template.
- A good library is small: around a dozen blocks, each doing one job, with few options.
- Register with
block.json, keep field groups in version control, and restrict what editors can insert.
What Is an ACF Block?
An ACF block is a block for the WordPress editor built with Advanced Custom Fields Pro instead of React. You describe the block in a block.json file, define its fields in ACF, and render it with a PHP template that reads those fields. The editor sees a form and a live preview; the developer writes the markup once and owns it. For client sites that matters more than anything else: the layout cannot be dragged out of shape.
Why a Small Library Beats a Page Builder for Some Sites
Page builders give editors every option, and every option is a way to make page forty look different from page four. A block library gives them the decisions that are theirs to make: the words, the image, the order of sections. Spacing, type sizes and colours come from the theme. Fewer choices is not a restriction for most content teams; it is the reason they stop asking for help.
How I Structure a Block
- One folder per block:
blocks/hero/block.json,hero.php,hero.css. Nothing about the block lives elsewhere. block.jsoncarries the name, title, category, icon, supported features and the ACF render template. WordPress loads the block's stylesheet only on pages that use it.- Field names are prefixed with the block name (
hero_title,hero_image), so a search across the project finds every use. - The template escapes on output and returns early when a required field is empty, so a half-filled block never prints broken markup.
- Inner blocks are allowed only where an editor really needs free content, and then with a fixed list of allowed blocks.
Keep Field Groups in Version Control
ACF can save every field group as a JSON file in the theme's acf-json folder and load it from there. I turn that on in every project. Field changes then travel through Git with the code that depends on them, a deploy cannot leave the database and the templates out of step, and reviewing a change to a field is as easy as reviewing a change to a template.
Limit What Editors Can Insert
- Allow only the library's blocks and a few core ones (paragraph, heading, list, image) with the
allowed_block_types_allfilter. - Turn off the features a design does not use in
theme.json: custom colours, custom font sizes, arbitrary spacing. - Lock the structure of templates that must not change, such as a landing page with a fixed section order.
- Give each block a short description and a sensible preview state, so the inserter explains itself.
What Goes Wrong
- Too many options. A block with twelve toggles is a page builder again. Split it into two blocks.
- One giant "flexible content" field. It works, but the editor loses the block inserter, patterns and reordering. Real blocks age better.
- Preview that differs from the front end. Load the same stylesheet in the editor, or editors stop trusting the preview.
Questions and Answers
Do ACF Blocks Need ACF Pro?
Yes. Block registration is a Pro feature of Advanced Custom Fields.
Are ACF Blocks Slower Than Native Blocks?
They render on the server with PHP, like dynamic native blocks. With page caching in front, visitors receive static HTML either way.
Can ACF Blocks and Elementor Live on the Same Site?
Yes, on different templates. I keep content pages on blocks and avoid mixing both in one page.