CPT results ordering by custom taxonomy

Forums › Forums › Search & Filter Pro › CPT results ordering by custom taxonomy

Viewing 2 posts – 1 through 2 (of 2 total)
  • Anonymous
    #221003

    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!

    Trevor
    #221070

    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.

Viewing 2 posts – 1 through 2 (of 2 total)

Search & Filter Support
Privacy Overview

This website uses cookies so that we can provide you with the best user experience possible. Cookie information is stored in your browser and performs functions such as recognising you when you return to our website and helping our team to understand which sections of the website you find most interesting and useful.

We also use cookies to store items in your cart as well as allowing your to login on the site.

You can adjust all of your cookie settings by navigating the tabs on the left hand side.

By continuing to use this site, you also agree to our Privacy Policy.