Reply To: Empty search with taxonomy filter not working properly

Home Forums Product Support Forums Ajax Search Pro for WordPress Support Empty search with taxonomy filter not working properly Reply To: Empty search with taxonomy filter not working properly

#8700

Ernest Marcinko
Keymaster

Hi!

Well, I can see two ways of resolving this:

1. Is to temper with the search query and add the ordering statement there. I do not recommend doing this, as it will be overwritten by the upcoming update.

2. Ordering the result objects by the new values using a filtering function. This is update proof, but harder to accomplish.

Can you disclose the code you have on the “pre_get_posts” filter? I might be able to put together a custom ordering function based on that, to order the result objects by the given meta field. However this ordering will only affect the actually visible result set (currently displayed page) results in the best case scenario – because it's executed after the results are parsed and cut.

Best,
Ernest Marcinko

If you like my products, don't forget to rate them on codecanyon :)