I’m trying to place a field group inside several of my flexible field layouts.
A lot of my layouts have repeating fields. Like Title, Title Tag, Title Color. Right now I have to add these to each layout. And if I need to make changes, I have to update each layout. I prefer to have a separate field group for the Title, Title Tag and Title Color. Then place those inside the subfields array alongside the layout-specific fields.
Before, I did this via a clone field. The field group itself was set to ‘disabled’. But now I’m trying to use ACF via code instead of the web interface. But there’s no clone field available through code.
I’ve experimented a bit with the functions acf_get_fields(), acf_get_local_field_group(), acf_get_local_field_groups(), but fail to leverage them to accomplish this.