Home › Forums › Product Support Forums › Ajax Search Pro for WordPress Support › re-use query sort order as search order with Ajax Search Pro. › Reply To: re-use query sort order as search order with Ajax Search Pro.
Hi,
Well, on the search results page some of these arguments are respected, but with the elementor live filter it is handled differently. Indeed using the asp_query_args filter is in my opinion the best option here. You can use these arguments to change the ordering.
However please note, that in the sample URL you had order by “views”, which is probably some sort of a custom field, so changing any of those argumens to something like “views DESC” will not do anything – as that field does not exist in the query.
You may also need to inject a sub select or something to the select statement to have the desired fields via these filters. Please be very careful when making direct changes to the final query.