plugins – Advanced Custom Fields and Commas in Numbers


I have ACF (Advanced Custom Fields) installed on my WordPress website and am trying to add a comma every 3rd place (1,000) instead of (1000). I am utilizing code I’ve found on other forums, but causes a critical error when I use it. I suspect this is my own error (novice) and hope someone can help me find out what I’m doing wrong.

add_filter('acf/format_value/name=number_of_supporters', 'fix_number', 20, 3);
function fix_number($value, $post_id, $field) {
  $value = number_format($value);
  return $value;

enter image description here

The website URL is and it leverages the Oxygen builder (if it’s relevant).

Thank you!

Tom J Nowell 1 year 2022-12-21T11:14:49-05:00 0 Answers 0 views 0

Leave an answer