Sorting Default resets when filtering

We have a Vendor Directory page that we are using the default sorting on (we are sorting by a numbered attribute called “Vendor Priority” that we created to be used by our admins.

We have this attribute set as the default sorting (Vendor Priority Descending).

First visit to the directory page, the sorting is correct but as soon as a any filtering is triggered the results default to the “date” sort.

Any help would be appreciated.

Cheers,
Jeff




Hi,

Please send temporary WP access to support@hivepress.io with details for reproducing this issue, and we’ll check it (please send only the link, without login and password). You can create a temporary access link using this plugin Temporary Login Without Password – WordPress plugin | WordPress.org.

We won’t be able to provide you with WP Access to the backend but I’m happy to provide as much information as I can here and/or have a screenshare to walk through our issues.

We have a staging site here for testings: https://contractla2stg.wpenginepowered.com/

  • I’ve disabled all plugins (other than Hivepress ones) and swapped the theme to your Expertpress (+ cleared all caches) to be sure it wasn’t anything on our end.
  • There is a custom Attribute we use for sorting called Priority (featured_vendor is the slug) that we have set up as the default sort - you can see it here: https://contractla2stg.wpenginepowered.com/vendor/
  • The attribute is simply a number from 1-3 that we set manually in order for us to display and sort vendors differently based on their Plan (free is the lowest priority).
  • As soon as we do any sort of search or additional filtering on the Vendor page, the sort parameter is blank.
  • For instance, instead of the URL being https://contractla2stg.wpenginepowered.com/?_sort=featured_vendor__desc&s=&post_type=hp_vendor&latitude=&longitude=&location=&product_type%5B%5D=835 it is https://contractla2stg.wpenginepowered.com/?_sort=&s=&post_type=hp_vendor&latitude=&longitude=&location=&product_type%5B%5D=835

One thing I’ve been able to determine is that it does retain the Sort if you manually select it after you’ve started filtering.

So going from https://contractla2stg.wpenginepowered.com/vendor/ to the parameter URLs ’ https://contractla2stg.wpenginepowered.com/?... resets the sort to Date but if you select our field and sort it keeps the sorting option for further filtering.

Hi,

Thanks, we reproduced the bug. It occurs when changing the default sorting option.

We will fix it in the next update.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.