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:
This site was created by Hookturn, the team behind ACF Theme Code Pro. If you are interested in contributing or have an extension to add, email us.
Awesome ACF is sponsored by the very awesome team at Pressidium. If you need reliable, secure and scalable Managed WordPress Hosting, check them out.