Flexible Content Field
Infinite scroll Flexible Content fields with Ajax Load More
In this example:
Ajax Load More will infinite scroll Flexible Content field data with the Advanced Custom Fields extension.
The flexible content field for Advanced Custom Fields acts as a blank canvas to which you can add an unlimited number of layouts – Ajax Load More is used to loop over each layout and display the results with infinite scrolling.
🔥  Cache flexible content fields to improve site performance.
This is the 1st Flexible Content Block!
Nulla vitae elit libero, a pharetra augue. Duis mollis, est non commodo luctus, nisi erat porttitor ligula, eget lacinia odio sem nec elit. Praesent commodo cursus magna, vel scelerisque nisl consectetur et. Maecenas sed diam eget risus varius blandit sit amet non magna.
Cras justo odio, dapibus ac facilisis in, egestas eget quam. Maecenas faucibus mollis interdum. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec ullamcorper nulla non metus auctor fringilla. Curabitur blandit tempus porttitor.
Sed posuere consectetur est at lobortis. Praesent commodo cursus magna, vel scelerisque nisl consectetur et. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus. Maecenas faucibus mollis interdum. Maecenas faucibus mollis interdum.
The following shortcode was used to create the Flexible Content Field example.
[ajax_load_more preloaded="true" posts_per_page="1" acf="true" acf_field_type="flexible" acf_field_name="alm_flex_content" container_type="div"Â images_loaded="true"]
Note: In this example, alm_flex_content is the name of the Flexible Content ACF Field Group. Ajax Load More will loop over each item in this Flexible Content field to build the infinite scroll listing.
The following Repeater Template was used to create the Flexible Content Field example.