Add ACF Local JSON

Share Now

Add index.php inside the acf-json folder for security

#Here is the code example

add_filter('acf/settings/load_json', 'my_acf_json_load_point');
function my_acf_json_load_point( $paths ) {
    // remove original path (optional)
    unset($paths[0]);
    // append path
    $paths[] = get_stylesheet_directory_uri() . '/acf-json';
    // return
    return $paths;
}
Picture of Nahid Mahamud

Nahid Mahamud

Web Developer | Graphic Designer | WordPress & Woo-commerce Expert