How to sort attribute options in frontend?

hey there, we use attributes with options and we already sort them in backend with sort function in the option.

in backend, when we create a listing the sorting is correct. but on our website the sorting is not. why? how could we set the correct sorting in frontend too?

You can see on screenshots that in backend it is mai, juni, juli …
but in frontend view it is juni, mai…



Hi,

Please clarify what exactly you mean by the backend frontend forms. Regarding the issue, please try adding this PHP snippet:

if ( ! defined( 'HP_CACHE' ) ) { 
    define( 'HP_CACHE', false );
}

You can add a PHP snippet using this doc: How to add custom code snippets - HivePress Help Center

​I hope this is helpful to you

as you can see in the pictures, we have sorted the options in the wordpress admin with the sort function. when creating a listing, these options are displayed correctly in the admin. but not on the website itself.

I observed the same issue, the attribute options are not presented in front end sorted from low to higher option order value.

Hi,

Please clarify, after disabling caching on your site, does the issue still exist?

Hi Andrii, @esamedien
please see attached to support the reported issue.
I created a new test listing attribute with option values A-E, with option orders 50-10.
The sequency is corect as per order number in the listing maintenance screen, however on the front-end the option values are presented in alphabetical order.
Hope this helps in finding the issue.


Note that the same issue exists for request attributes (tested) and potentially vendor attributes (not tested).

1 Like

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.

Sorry Andrii, but @robbo already send all details you have to know. My first post was with all details, but i think robbos text was much better so what more details you need? Everything you need to know is already written down…

@esamedien I have provided the temp access, so hopefully this is all the team needs to get to the bottom of this.