Support

Account

Home Forums Backend Issues (wp-admin) Edits to Field Groups Synced Through JSON Reply To: Edits to Field Groups Synced Through JSON

  • You are creating a different save point. This will save all field groups edited to the plugin folder. It appears that the file is not being saved to the plugin folder for some reason.

    But you are not loading the json_file from this point, I really don’t know how you’re syncing the field group without adding a load point.

    I’m not sure what exactly you are trying to accomplish, but if it worked you would overwrite the file in the plugin folder and this would then be overwritten when the plugin is updated.

    I think what you want to do is to add a load point to load json files from the plugin and here you want a priority of > 10 to allow the acf-json folder in the theme to be loaded first. This will mean that the JSON file from the plugin will only be loaded if that JSON file does not exist in the theme. Create an acf-json folder in the theme folder. When you sync and then save the field group it will save it to the theme folder and override the json file in the plugin. But doing this will also mean that if you ever updated this field group in the plugin that those changes till not effect any site where they have been changed.

    The best way to have a field group in the plugin that can be overridden by custom settings is to create an options page for editing whatever options you want and then use ACF filters to modify the field group (acf/validate_field_group) based on the values in these options.