Thank you @zackpyle for the quick response!
I changed the function name in the second filter and that worked!
Allan
Hi,
I think this problem has been posted above by aimkbe but I couldn’t figure out the solution.
Below I have two numbers fields that I would like to add the comma to, when I add the first filter, it works perfectly but when I add the second it breaks the site, aimkbe says he solved the issue “I solved the issue… i used the same variable for both filters!”
I am not sure what I need to do to make this work. Any help would be appriciated. Thank you
add_filter(‘acf/format_value/name=rent_pcm’, ‘fix_number’, 20, 3);
function fix_number($value, $post_id, $field) {
$value = number_format($value);
return $value;
}
add_filter(‘acf/format_value/name=asking_price’, ‘fix_number’, 20, 3);
function fix_number($value, $post_id, $field) {
$value = number_format($value);
return $value;
}