I am struggling to find a way to limit the number of results published in a custom field {event_date} is greater than {current_time}. The simple code I tried to use was:
{exp:channel:entries
channel="events"
disable="category_fields|member_data|trackbacks|pagination"
dynamic="no"
orderby="event_date"
sort="asc"
limit="3"
}
{if event_date >= current_time}
<h2>{title}</h2>
<p> {/if} <br />
{/exp:channel:entries}The problem is that the limit parameter loops through 3 entries that do not meet the conditional requirements and then stops looking for results, so nothing gets published.
If it weren’t a date issue I could use the search= parameter, but since I need to compare it to current_time, that doesn’t work.
Any thoughts on how I can achieve this? It is probably something obvious, but I’ve been thinking about it too long and am lost in the logic forest now.
Any help is appreciated.