Orderby set to DESC not sorting correctly
-
I am using custom fields in WordPress, one of which is a Download Count. The plugin accurately logs the number of times a file has been downloaded, and that number displays properly within my W4 Post Lists.
However, when I sort by DESC, the count starts at 9, not at the highest number. Files will have 10, 11, 12, 24, 36, or 100 downloads, and the order instead sorts like this when set to DESC:
9, 8, 7, 6, 5, 4, 43, 42, 41, 3, 36, 33, 30, 2, 27, 24, 22, 1, 17, 14, 11, 5
It is treating 2-digit and 3-digit numbers as if there are decimals after the first digit. Like it’s interpreting 43 as “4.3” instead of 43 as it should be.
This results in my list being all wacky.
The lists are in a secured Members Area, but I’d be happy to get you access if you would contact me.
Page that shows an example is here:
https://www.chillingtalesfordarknights.com/members-area/chilling-tales-for-dark-nights/most-downloaded/?page19862=3Here’s a screenshot that illustrates how it is sorting:
http://imgur.com/lLJQHdeHow does this happen, and can it be fixed?
The topic ‘Orderby set to DESC not sorting correctly’ is closed to new replies.