- This topic has 1 reply, 2 voices, and was last updated 6 years, 7 months ago by .
Viewing 2 posts - 1 through 2 (of 2 total)
Viewing 2 posts - 1 through 2 (of 2 total)
These forums are now closed and remain for historical purposes.
None of the content applies to the new version 3. For support, get in touch via our contact form.
Forums › Forums › Search & Filter Pro › CPT results ordering by custom taxonomy
Hi, Could you please point me in the right direction how to order S&F results by a custom taxonomy? I use the Shortcode Display Result Method and a custom results.php (“4455.php” in theme/searchandfilter/). All filters work fine, but the ordering needs to change. Think I need a custom function for that? Thanks in advance!
Generally, we allow searching by Custom Fields (where the meta value is a single value), but taxonomies are stored as arrays in WordPress, so that makes it difficult.
You might need to set custom sort (sortby) arguments in this filter:
https://searchandfilter.com/documentation/action-filter-reference/#edit-query-arguments
You would need to work out the logic yourself, or hire a coder, but I think it could be done this way.