Last active
June 3, 2022 19:32
-
-
Save mishterk/f44db26a0ecde9202f8c2b85966cca06 to your computer and use it in GitHub Desktop.
How to load ACF JSON files from additional directories. See https://www.awesomeacf.com/snippets/load-acf-json-files-from-multiple-locations/ for more details.
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/load_json', function ( $paths ) { | |
$paths[] = get_template_directory() . '/some/custom/dir'; | |
return $paths; | |
} ); | |
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/load_json', function ( $paths ) { | |
$paths[] = get_template_directory() . '/some/custom/dir'; | |
$paths[] = WP_CONTENT_DIR . '/uploads/some/custom/dir'; | |
$paths[] = '/some/system/path/dir'; | |
return $paths; | |
} ); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment