Skip to content

Instantly share code, notes, and snippets.

@larodiel
Created December 13, 2022 01:53
Show Gist options
  • Save larodiel/7f6fffe5d0ace5b9d36d3f914d839754 to your computer and use it in GitHub Desktop.
Save larodiel/7f6fffe5d0ace5b9d36d3f914d839754 to your computer and use it in GitHub Desktop.
Set the ACF SYNC path on sage template
<?php
add_filter('acf/settings/save_json', function($path) {
return get_stylesheet_directory() . '/acf-json';
});
add_filter('acf/settings/load_json', function($paths) {
unset($paths[0]);
$paths[] = get_stylesheet_directory() . '/acf-json';
return $paths;
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment