1

I want to display entries in a specific custom order in Craft. For example entry Id 1, then Id 5, then Id 3. How can I do that?

4

Try using a structure. You can reorder them in the CP.

{% for entry in craft.entries.section('your_structure') %}
  {{ entry.title }}
{% endfor %}
1

Another option if you can't use structures is to have a global that is a collection of entries, and use that global to determine which entries and in what order.

{% for e in myGlobal.myEntries %}
  {{ e.title }}
{% endfor %}
0

Structures aren't available in the free version of Craft, but a useful workaround is to simply manipulate the entry published date to accomplish a custom sort, as Craft orders entries from newest to oldest by default. It's a hack, but it's useful in a pinch.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.