Support

Account

Home Forums ACF PRO Import PHP generated fields into ACF GUI Reply To: Import PHP generated fields into ACF GUI

  • Most of these functions to not have documentation, you need to dig around in ACF code. After the field group is completely set up, get the field group.

    
    $group = acf_get_field_group[$group_key];
    

    then get the fields for the group

    
    $group['fields'] = acf_get_fields[$group_key';
    

    then write the field group to a file

    
    $filename = '/aba/path/to/your/file.json'
    $handle = fopen($file, 'w');
    fwrite($handle, json_encode($group));
    fclose($handle);
    

    then you can download this file from the server and import it to ACF.