CMS sort not working (+ combine +filter +pagination)

I use several solutions on this page

  • CMS Filter
  • CMS Sort
  • CMS Combine
  • CMS Pagination
    Everything seems to work like a charm, except the sorting.
    Any idea what’s causing the problem?

The project link is here:

Thanks for your help

Hey @Fabien_ouiflow! Can we switch the select element to a button and then add this code to the </body>?

  window.fsAttributes = window.fsAttributes || [];
    (listInstances) => {
      console.log('cmsload Successfully loaded!');


Hi Luis,
I used this script and replaced the select by a button but I still can’t figure out where is the problem :grimacing:
If you have any idea :pray:

Hey @Fabien_ouiflow! On my end, it is sorting the list from oldest to newest post. Is this not the desired behavior?

You can add the setting below to the trigger to sort the list from newer to older.

If the issue is not this please share a video explaining what is wrong :pray:

Hi @Support-Luis ,
I found something in the date format :
If I use a format with numbers (e.g. 6/11/2023) the sorting is done on the first digit of the string, then the 2nd and so on.
This makes the filter inconsistent:

If I switch to an alphabetical format (e.g. Nov 6, 2023), the sorting is performed as desired :

The only problem is that the date format doesn’t correspond to the European format, but we could certainly add a script to change this (but we’ll have to check that it works with the attributes).

Thanks for your help

Do let me know if you need any help to implement the script! You can take a look at the Attributes API for more info on how to add code after any solution has executed.

1 Like