Custom default sort for different searches
Viewing 2 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic.
I have a WooCommerce site, and want to use different default sorts, for the search and shop results.
It is possible using our WP filter https://www.wpsolr.com/guide/actions-and-filters/search-results-default-sort/
The idea is to use the WPSOLR filter above, and compare the current url to the two target urls (blog search and product search) to return the specific default sort (by relevancy or product price for instance).
You do not need to show a sort listbox if you don’t want to. The correct default search will be applied in the background search query, and the results accordingly sorted.
You must be logged in to reply to this topic.