1

How can I incorporate the date_modify into the craft.entries query so that the pagination takes into account this criteria? At the moment the limit is also accounting for past entries and I'm hitting errors whatever I try.

{% paginate craft.entries.section('events').limit(10).order('date asc') as entries %}

    {% for entry in entries if entry.date > now|date_modify('-1 day')  %}

        ...

    {% endfor %}


    {% include "includes/_pagination" %}
1

You can add it like every other criteria property

craft.entries.date('>' ~ now|date_modify('-1 day')|atom) 

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.