Home › Forums › Front-end Issues › Strange results when using orderby a number field › Reply To: Strange results when using orderby a number field
Sorry John that’s a typo, I fixed it. It’s correct in the template code.
(The loop wouldn’t give any values if it was missing)
Anyway, it seems that the echo number_format adjustment is what confuses the sorter so that it’s treated like a regular string and not a number/currency which is problematic. The commas need to be parsed in before not after. Arg.
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.