Login

To vote or comment, enter your email and we'll send a magic link

2

Add ascending/descending sort order

open

I would like to be able to switch between ascending and descending sort order in facets. The current "sort by" options are hardcoded. For instance, I would like to use fSelect & sort by descending term order (instead of the current default which is ascending).

7 months ago

Comments (3)

You can make forms in php template files with the set ($order = 'DESC') you like. Hopefully more details will be added here: https://facetwp.com/help-center/facets/facet-types/sort/

6 months ago

@Aron - it's fairly uncommon for facet choices to need to display in descending order, which is why that setting is omitted.

The main exception is sorting by result count (which FacetWP automatically sorts DESC).

Could you give me an example of your taxonomy so I can get a better idea of why it needs to be in descending order?

Thanks

6 months ago

Hi Matt, in my use case we have a filtering option ”Published in” where the default sort shows earliest date at the top. Most people use the latest issues for filtering. See https://utstallningskritik.se/arkivet & the facet ”Publicerad i” (the site is in Swedish)

6 months ago