Support

Account

Home Forums General Issues Fatal error: Call to undefined function the_field_return() Reply To: Fatal error: Call to undefined function the_field_return()

  • Hi Elliot, thanks for the quick response! I dug through the archive of the site (before I updated ACF) and I came across the method in api.php. Maybe the previous developer added it? Maybe if I add it to functions.php that will take care of it?

    // the field return
    function the_field_return($field_name, $post_id = false)
    {
    	//echo 'field name: '.$field_name.', post id: '.$post_id;
    	$value = get_field($field_name, $post_id);
    	
    	if(is_array($value))
    	{
    		$value = @implode(', ',$value);
    	}
    	
    	return $value;
    	
    	
    }