Giving WordPress Editors a Page Builder Made from ACF Flexible Content

Giving WordPress Editors a Page Builder Made from ACF Flexible Content

Editors want to build pages freely, designers want the brand kept consistent, and developers want lean code. ACF Flexible Content satisfies all three by giving editors a library of designed sections they can add, reorder and fill.

Register the fields in code

Defining field groups in PHP or local JSON keeps them in version control and deploys them with the theme:

acf_add_local_field_group([
    'key'    => 'group_sections',
    'title'  => 'Page Sections',
    'fields' => [[
        'key'     => 'field_sections',
        'name'    => 'sections',
        'type'    => 'flexible_content',
        'layouts' => [ /* hero, features, faq ... */ ],
    ]],
    'location' => [[['param' => 'post_type', 'operator' => '==', 'value' => 'page']]],
]);

Give each layout its own template

while (have_rows('sections')) {
    the_row();
    get_template_part('template-parts/sections/' . get_row_layout());
}

Small, single-purpose templates are easy to maintain and easy to extend.

Design a system of sections

Base every section on the same spacing, type and colour tokens, so any combination looks deliberate rather than patched together.

Add guard rails

  • Offer select fields for icons, accent colours and column counts instead of free styling.
  • Write helpful field instructions and set sensible defaults.
  • Cap repeaters where a design breaks beyond a certain number of items.

Keep shared content in one place

Header links, footer content and contact details belong on an ACF options page rather than on every page.

The result is fast pages with no builder overhead, a consistent brand and editors who can launch a new landing page in minutes. This site is built the same way.

Want this done for you? Find out more about our PHP development service.

Keep reading

Related articles

All articles

Need a hand?

Stuck on something similar?
We can fix it with you.

Send us the problem. A senior developer reads every message and replies within one working day.