Sorting taxonomy list of "popular tags" in descending order

It took me a while to hit upon a successful way of doing this, as all my attempts at adding any kind of ‘desc’ descending qualifier to the sort were futile. Here’s the trick:

    {% for tax,value in taxlist[taxonomy]|sort('value')|reverse %}

where the value is the count of matches and the |reverse turns the taxlist array on its head.

1 Like

I’m pretty new to this. Can you tell me where you put that code to get it to work? Thank you!