If you want more control over how your WordPress pages are structured, the ACF Flexible Content Field is a powerful way that gives you just that. It works like a custom layout builder where you can create and arrange different content blocks—like hero sections, image galleries, testimonials, and more—all from the WordPress admin panel without touching code.
Use Case Example:
Let’s say you’re building a services page. Instead of using a rigid template, you can use ACF Flexible Content to create a hero banner at the top, followed by a section with icons and descriptions, and end with a customer testimonial block. You can define each of these as different layouts and reuse them across pages, making your content both dynamic and easy to manage.
Table of Contents
Key Takeaways
- Learn what the ACF Flexible Content Field is and how it works in WordPress.
- Follow easy steps to create a Flexible Content Field.
- See how to set up different layout types like hero banners, image galleries, and testimonials.
- Understand how Flexible Content Fields are different from Repeater Fields.
- Save time by building reusable content sections—no need for a page builder.
What is ACF Flexible Content Field in WordPress?
The ACF Flexible Content Field is a feature available in the Advanced Custom Fields Pro plugin. It allows you to create multiple layout types inside one custom field group. Each layout can have its own set of fields—giving you full flexibility to mix and match different content sections based on the needs of the page.
Think of it like a content builder that lives inside the WordPress editor. Unlike the Repeater Field (which uses the same layout repeatedly), Flexible Content lets you choose different layouts per entry, such as:
- Hero Section
- Text + Image
- Gallery
- FAQs
- Testimonials
This field is especially useful for developers and content creators who want to build structured, modular content while keeping things user-friendly for clients or team members.
How To Use the ACF Flexible Content Field?
The steps below will guide you towards creating Flexible Content field layouts for your WordPress site.
Checkout: How To Display Data Form ACF Flexible Content In Elementor?
Step 1: Create a Flexible Content Field in ACF
Start with creating a field group if not created yet, and then add a new field and set its type to Flexible Content.

Step 2: Add Layouts and Sub-Fields to Your Flexible Content Field
Under the ACF flexible content field type, you can add any number of layouts, each with its own set of fields.


For example, as you can see in the above screenshot, the flexible content field (Flex Content) contains two layouts (Hero & Section), each containing its own subfields.
Step 3: Assign the Flexible Content Field to Your Pages or Posts
Lastly, specify the location where you want to apply the flexible content field; if you have already assigned a location, you can skip this process.

How to Use ACF Flexible Content Field in Templates
The ACF Flexible Content field returns a multi-dimensional array containing the layouts and their sub-field values.
Accessing the value is done via the have_rows, the_row, get_sub_field, and the_sub_field functions.
Loop example
This example demonstrates how to loop over an ACF Flexible Content field value and access subfields from different layouts.
<?php
// Check value exists.
if( have_rows('content') ):
// Loop through rows.
while ( have_rows('content') ) : the_row();
// Case: Paragraph layout.
if( get_row_layout() == 'paragraph' ):
$text = get_sub_field('text');
// Do something...
// Case: Download layout.
elseif( get_row_layout() == 'download' ):
$file = get_sub_field('file');
// Do something...
endif;
// End loop.
endwhile;
// No value.
else :
// Do something...
endif;
Display Layouts Dynamically in WordPress Using ACF
This example demonstrates how to loop through a Flexible Content field and generate HTML for different layouts.
<?php if( have_rows('content') ): ?>
<?php while( have_rows('content') ): the_row(); ?>
<?php if( get_row_layout() == 'paragraph' ): ?>
<?php the_sub_field('paragraph'); ?>
<?php elseif( get_row_layout() == 'image' ):
$image = get_sub_field('image');
?>
<figure>
<?php echo wp_get_attachment_image( $image['ID'], 'full' ); ?>
<figcaption><?php echo $image['caption']; ?></figcaption>
</figure>
<?php endif; ?>
<?php endwhile; ?>
<?php endif; ?>
Conclusion
In conclusion, ACF Flexible Content Field is like a helpful feature for making your WordPress pages look great. It lets you easily organize different content sections. Each section can be customized with its own details, making it simple to create and design your pages exactly the way you want. It’s a user-friendly feature that adds a touch of creativity and structure to your content without needing advanced technical skills.
FAQs on ACF Flexible Content Fields in WordPress
What is ACF Flexible Content Field in WordPress?
The ACF Flexible Content Field is a dynamic field type in the Advanced Custom Fields Pro plugin that allows users to create multiple layout types inside a field group, offering full control over page structure.
Do I need ACF Pro to use the Flexible Content Field?
Yes, the Flexible Content Field is only available in the Advanced Custom Fields Pro version.
Can I reorder or remove layouts after adding them?
Yes, Flexible Content layouts can be reordered, duplicated, or removed from the WordPress editor, giving full flexibility to manage the content structure.
What is the difference between ACF Flexible Content and Repeater Field?
Repeater fields use the same layout repeatedly, while Flexible Content allows you to choose from multiple layout types within the same field.
What are some real-world use cases of ACF Flexible Content?
Landing pages, service pages, about sections, product features, testimonials, team sections—basically, any page that needs modular content layouts.