Forums › Forums › Search & Filter Pro › Numerical sorting not as should be
- This topic has 13 replies, 3 voices, and was last updated 7 years, 11 months ago by Trevor.
-
Anonymous(Private) October 18, 2016 at 10:38 am #64736
Hi,
On http://roulette-masters.com/search-filter/ the filter by Review Score (added through Advanced Custom Fields plugin) doesn’t go as it should.
In the settings tab I made the default order as Meta Value (descending) and the Meta key as review_score (numerical). It does order by default, but not the way it should be. The 10 is the highest, but then 9,0 to 9,9 are completely random. Followed by 8,0 to 8,9 completely random.
Strangest thing is that the manually implemented sorting order DOES work. In the sidebar I left the manual sort order to show the way it should be sorted.
I hope you can help me set the default order as it is with the manual sorting order.
Hope to hear from you soon.Kind regards,
Victor
Trevor(Private) October 18, 2016 at 2:26 pm #64829Hi Victor, from what I can see, this seems like something is overriding the sort order, and basing it on something else (another field). Now, you know the data far better than me. Can you see what that sort order is? Alphabetical by Title, by date published ….
Anonymous(Private) October 18, 2016 at 2:52 pm #64846Hi,
Blog posts are sorted by date. The way it seems now is that everything from 9.0 to 9.9 is sorted by date, then 8.0 to 8.9 and so on.
Strange thing remains that the sorting order through the frontend dropdown does work, but not if I select it as default sort order.Trevor(Private) October 18, 2016 at 2:58 pm #64856As I suspected. This means that there is some code in your theme that is over-riding our filter. Probably a pre_get_posts() or similar. You need to look for this (might be in the functions.php file, or might be in a template, or a plugin). Or you need to find the wp_query and see if it is being done there.
-
AuthorPosts