When you are setting nextEvent
, you can limit only events that are upcoming and only output the first result you get back like so:
.startDate('>= ' ~ now).first()
So you can take that and update your code like so:
{% set nextEvent = craft.entries.section('events').order('startDate').startDate('>= ' ~ now).first() %}
{% for entry inif nextEvent %}
foo
{% endforendif %}
I have assumed you have a section called 'Event's until we get some clarification as to what craft.events.events
is.