Support

Account

Home Forums General Issues Parent & Child Theme JSON Sync Reply To: Parent & Child Theme JSON Sync

  • I would set second load point for field groups for the parent theme

    
    add_filter('acf/settings/load_json', 'parent_theme_field_groups');
    function parent_theme_field_groups($paths) {
      $path = get_template_directory().'/acf-json';
      $paths[] = $path;
      return $paths;
    }
    

    Then I would work on changes to fields in the parent them only on a site that uses the parent theme. I would not Sync, or allow these field groups to be changed in the child theme.

    If I want to have additional fields groups in child themes I would only add fields to a site using that theme. Since each child theme would also have an acf-json folder, these files could be synced to any other site using that theme.