Displaying Flexible field
The Flexible Content field is a unique ACF field type that is not available in other meta vendors. It provides a versatile, block-based editor, allowing for structured content creation.
With the Flexible Content field, you can define multiple layouts and sub-fields within a single field, giving you complete control over the content structure. Editors can easily choose and arrange these layouts within the editor interface.
Pay attention: the Flexible field is supported only in Advanced Views Pro.
1. How to display a Flexible field
To display a flexible field, follow these steps:
a) Create a new Layout ('Primary'):
On the Fields tab, click the 'Add field' button.
Choose the flexible field.
After selecting the flexible field, you'll see a new 'Sub-fields' tab appear in the row. Click on it.
Select all the layouts you want to display.
Save the current Layout.
b) Create a new Layout ('Internal'):
On the Fields tab, choose your group in the 'parent group' field.
In the parent field, select the 'flexible layout' from the previous step.
Click the 'Add field' button and assign all the layout fields you want to display.
Save the current Layout.
c) Amend the 'Primary' Layout:
Find the 'flexible' field in the fields list.
Open the 'Sub-fields' tab and locate the target 'layout'.
Fill out the "Field Layout" setting by choosing the 'Internal' Layout.
Save the Layout, copy its embedding shortcode
Embed Layout: paste the shortcode inside the target place
You're done!
Advanced Views will automatically retrieve the set of chosen layouts on the page and pass the data of every layout to the specific Layout defined for each layout. This process occurs dynamically, granting editors the freedom to customize content without manual intervention.
2. Render options
2.1) Items List
To display all the items in a single row, you can use the CSS Flexbox:
2.2) Items Grid
To display all the items as a grid, you can use the CSS Grid:
Last updated