Awesome ACF

Load ACF JSON files from multiple locations

Use these snippets to load ACF JSON files from more than one directory

Last updated

Use these snippets to load ACF JSON files from more than one directory

<?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;


} );

Stay updated

Get ACF tips and new extensions in your inbox. No spam. Unsubscribe anytime.