Hi, I’m am trying to show 3 events filtered by an acf_date field, showing only future events.
This works:
<Loop type=event orderby_field=event_date order=asc>
<If acf_date=event_date after=today>
<Field title />
</If>
</Loop>
But when I try to limit it to 3 posts, eg:
<Loop type=event count=3 orderby_field=event_date order=asc>
<If acf_date=event_date after=today>
<Field title />
</If>
</Loop>
It shows less than 3 because the past events are still being counted but not shown.
I’m guessing it should be something like this but am not sure of the exact syntax:
<Loop type=event count=3 orderby_field=event_date order=asc custom_date_field=event_date custom_date_field_format="d/m/Y" custom_date_field_compare=before custom_date_field_value=current>
<Field title />
</Loop>
But nothing shows up for that. Any suggestions?