I'm trying to pull all events where the event's year from endDate
matches the queried year (yearParam
). When I have this, it's pulling in all events before the yearParam
:
{% set pastEntries = craft.entries({endDate: '<' ~ yearParam}).section('events').order('endDate desc') %}
However, what I'd really like is to get entries that match the yearParam
(so if the yearParam is 2017, then any events from 2017 should be pulled in).
Any and all help is greatly appreciated. Thanks!
{endDate: '=' ~ yearParam}
or{endDate: yearParam}
do what you're looking for?