I am trying to get all entries posted from 2018 and only 2018. All the other methods I've seen are for from a specific date or between two dates. Is there a simple way to get all posts from 2018 without having to specify get all entries between 1 January 2018 and 31 December 2018
?
The markup below is where I have got to, but this is getting all entries from 2018 onwards. But when I change the >=
parameter to ==
it appears to break it.
{% set event = craft.entries.section('events').startDate('>=' ~ formYear).one() %}