Home › Forums › General Issues › Formatting number fields using format_value › Reply To: Formatting number fields using format_value
Hi John,
Thank you very much for kindly getting back to me!
I just figured it out by a piece of code that works:
add_filter('acf/format_value/name=listing_price', 'fix_number', 10, 3);
function fix_number($value, $post_id, $field) {
$value = number_format($value);
return $value;
}
I wanted to format the front-end display!
Now I just have to input the prices again of over 100 listings:-) But at least they display correctly!
I wonder why this isn’t a default setting of ACF and a piece of code is needed to be displayed properly?
Thank you very much for your time!
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.