If you're working on a project with lots of Flexible content field 'rows' it can really help to break them into template parts
If you’re like most WordPress Developers I know that use Advanced Custom Fields’ Flexible Content Field as a custom page builder, it’s likely you’ll be working with a large number of layouts.
All of the logic could be contained in one file however I prefer to split each ‘row’ into its own partial for easy maintenance.
For example, if I had row called testimonials_row
I’d have a folder in my theme called components
which would contain the partial testimonials_row.php
.
Here’s a very simple example of how you could implement this in your projects: