Support

Account

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

  • Has anyone been able to do something similar with the save function?

    I copied @johanhermansson suggestion into the save filter, but am getting this error:
    [18-Mar-2019 22:20:21 UTC] PHP Warning: rtrim() expects parameter 1 to be string, array given in .../wp-includes/formatting.php on line 2660

    add_filter('acf/settings/save_json', 'my_acf_json_save_point');
    function my_acf_json_save_point( $path ) {
    	$paths = array(THEME_DIR.'/config/acf-configs/acf-json');
    
    	if(is_child_theme()) {
    		//If we are in the child theme, check for child theme specific json files
    		$paths[] = CHILD_THEME_DIR.'/config/acf-configs/acf-json';
    	}
    
    	// return
    	return $paths;
    }