Custom sort orders for posts

The order attribute works on a handful of resource fields (e.g., title, tags, authors, etc.).

But say I have a collection/ channel of 100 different recipe posts. It would be nice if I could sort them by calories, grams of protein, cook time, or price for example.

I realize you could edit the published_at field in the Admin, and use that as a stand-in for a custom field. However…

  1. You’d lose your ability to ever sort those posts by date.
  2. You might eventually have to re-index everything (like if you need to input something that isn’t a valid date).
  3. This is only one field, so you couldn’t sort the recipes by calories on one page and by cook time on another, for example.

So I’m essentially asking for the ability to add custom fields to posts/ pages for the sole purpose of creating custom sort orders.

@John has mentioned adding some form of Custom Fields semi-recently, I would still love it but cant find it as a votable option on the forums.

1 Like