Ordering taxonomy terms by weight

Hi guys,

I’m trying to order taxonomy terms weight but it won’t work…

Can you check my code please?

  {{ with .Site.GetPage "taxonomies" "songs" }}
    {{ range first 50 ( where .Site.Pages.ByWeight "Params.male" true ) }}
      <li><a href="{{ .Page.Permalink }}">{{ .Page.Title}}</a></li>
    {{ end }}
  {{ end }}

and in my _index.md taxonomy pages:

title: "Luke Bryan"
slug: "luke-bryan"
male: true
songs_weight: 55

It lists all male singers but not ordered by the weight…
Is the name “songs_weight” correct?

Thank u :slight_smile:

I changed “songs_weight” to “weight” and now it works…

But it sorts everything from low number to high number. How can I reverse that?

.Reverse doesn’t work…

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