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;
}
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.