Hi!
I've got a website where listings can get a 'featured location' and show up in the top of the list. So i've sorted my view by the featured locations field. After the featured locations, I would like the list to sort secundary by rating with the WP-PostRatings plugin (the 'ratings_average' field).
I only see some basic options when setting up the secondary sorting. Is it possible to sort the list by featured locations first, and ratings second?
Thanks,
Tim
Dear Tim,
As you can see, the option "Secondary sorting" only supports few basic options, it does not support custom field, if you agree, we can take it as a feature request, our developers will evaluate it.
Currently, I suggest you try with Views filter hook "wpv_filter_query", to apply the "secondary sorting" by custom field, see our document:
https://toolset.com/documentation/programmer-reference/views-filters/#wpv_filter_query
When displaying a View listing posts, this filter is applied to the arguments being generated by the View settings before they are passed to the WP_Query class.
https://codex.wordpress.org/Class_Reference/WP_Query#Order_.26_Orderby_Parameters
Hi Luo,
Thanks for the fast reply. I would like to see this feature in a future update. 🙂
As your request, I forward it to our supporter Beda, he manages the feature request of Views plugin, our developers will evaluate it, but there isn't any ETA for it, you can subscribe to our blog to get the updated news:
https://toolset.com/blog/