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?
EDIT:
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;
}
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.