Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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.
<?php
add_filter( 'acf/settings/load_json', function ( $paths ) {
$paths[] = get_template_directory() . '/some/custom/dir';
return $paths;
} );
<?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
You can’t perform that action at this time.