Add ACF Local JSON

Share Now

Share on facebook
Share on pinterest
Share on twitter
Share on linkedin
Share on email

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;
}
Nahid Mahamud

Nahid Mahamud

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