Created
December 13, 2022 01:53
-
-
Save larodiel/7f6fffe5d0ace5b9d36d3f914d839754 to your computer and use it in GitHub Desktop.
Set the ACF SYNC path on sage template
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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