my entries have simple numbers as title (1, 2, 3, ... 10, 11 etc.). I'd like to order them naturally and not 1, 10, 11, 2, 3 etc. Is Craft allowing this?

1 Answer 1


I think the simplest solution is to use a plugin like Twig Better Sort or SuperSort. With those you would query for your entries as normal and then apply the Twig filter to sort the array.

{% set entries = craft.entries.section('mySection') %}
{% set entries = entries|supersort('natsortAs', '{title}') %}

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.