[Resolved] Help! Sort by decimal custom field problem.
Hi everyone. I’m trying to make posts that have custom fields which contain numerical decimals, e.g.,
234.34, 500.00, 3000.00. Now, I want to sort those posts by using a custom
I did the
meta_key=decimal&orderby=meta_valuething, but I’m having a problem because it’s sorting alphabetically. So in doing that, it is treating 500.00 to be greater than 3000.00. Is there a way for me to fix this by modifying the query? Or maybe a custom function?
Any help will be much appreciated.
[moderated–bump removed. Please refrain from bumping as per Forum Rules]
- The topic ‘[Resolved] Help! Sort by decimal custom field problem.’ is closed to new replies.