Support

Account

Home Forums ACF PRO acf-json fields not loading from parent theme Reply To: acf-json fields not loading from parent theme

  • I think it would be safer to use the filters for this. In my setup I want to use both the child theme and parent theme acf-json, but only save to the child theme acf-json folder:

    add_filter('acf/settings/save_json', function() {
    	return get_stylesheet_directory() . '/acf-json';
    });
    
    add_filter('acf/settings/load_json', function($paths) {
    	$paths = array(get_template_directory() . '/acf-json');
    
    	if(is_child_theme())
    	{
    		$paths[] = get_stylesheet_directory() . '/acf-json';
    	}
    
    	return $paths;
    });

    Documented here.

    I hope it helps 🙂