Assuming that I’ve a total number of 10 entries in my section('exhibitions') where 8 of them have their entry.endingDate < now, I limit the display to 8 entries but the paginate shows a next button whereas the next page is empty:
{% paginate craft.entries.section('exhibitions').limit(8) as pastExhibitions %}
{% for entry in pastExhibitions %}
{% if entry.endingDate < now %}
…
{% endif %}
{% endfor %}
{% if paginate.prevUrl %}
<a href="{{ paginate.prevUrl }}" class="button previous">← Précédent</a>
{% endif %}
{% if paginate.nextUrl %}
<a href="{{ paginate.nextUrl }}" class="button next">Suivant →</a>
{% endif %}
{% endpaginate %}
How can I add a date filter, in this case < now, to the paginate configuration in order to only paginate on entries that are < now?