Home Forums General Issues Import json with acf-json folder Reply To: Import json with acf-json folder

  • @hube2 I’ve tried this, but it doesn’t work.

    I created the fields locally and moved it to the server. Both files (functions.php – local and server) have both functions: one for loading and one for saving. There are no other field groups on the live server.

    The fields are not displayed on post edit and the options page are empty two.

    What is wrong?

    I’ve do this in the Master-Theme. If i do it in the child theme it works. But only in the folder “acf-json”. Not in my folder /json-sync/.

    I want to use the fields with all themes (4) on all servers. Also i put it in a plugin.

    Saving Works great with this function

    add_filter('acf/settings/save_json', 'bks_acf_json_save_point');
    function bks_acf_json_save_point( $path ) {
          // update path
          $path = plugin_dir_path( __DIR__ ) . '/acf-json';
          // return
          return $path;

    Loading with this funtion don’t works.

    add_filter('acf/settings/load_json', 'bks_acf_json_load_point');
    function bks_acf_json_load_point( $paths ) {
          // append path
          $paths[] = plugin_dir_path( __DIR__ ) . '/acf-json';
          // return
          return $paths;