This is super weird. I have this channel entries loop:

  {if webinars_date > current_time}

    {if count == 1}
      <div class="heading clearfix">
        <h3>Upcoming Webinars</h3>

      <ul class="items webinars resetlist">

    <li class="clearfix">
        <a href="{webinars_registration}" class="preview">
              alt='{title} preview'
        <div class="text clearfix">
            <h4><a href="{webinars_registration}">{title}</a></h4>
            <p class="sml"><strong>{webinars_date format='%F %j, %Y'}</strong> / {webinars_date format='%g:%i%A'}</p>
            <a href="{webinars_registration}" class="btn-ui action">Register</a>

    {if count == total_results}

      {if count == 5}
        <p class="learn-more clearfix"><a href="{path='resources/webinars/upcoming'}">View All Upcoming Webinars &raquo;</a></p>

It basically shows all non-featured upcoming webinars, sorted by a custom date field. What's weird is that adding sort="asc" causes the {if count} conditionals at the top and bottom not to work, so the opening and closing <ul> tags aren't output.

What's even weirder is that if I put sort="desc", everything works fine.

Anybody ever seen anything like this before?

EE 2.5.5

2 Answers 2


Count is an absolute entry count, so your earlier conditional of {if webinars_date > current_time} may be returning entries that the loop considers "1" but your conditional, run AFTER the returned counted entries, excludes it. In order to use count, you'd need to narrow the entries loop with a query or a parameter to exclude entries that you don't want returned, or move the {if count == "1"} conditional outside of that wrapping conditional so it fires no matter what.

  • An addon that may help you achieve the conditional as a parameter is Solspace's Date Field Filter, which allows you to essentially re-map what the entries loop uses as its date field, and therein you can specify a start date of today, using that newly re-mapped date field. Apr 17, 2013 at 17:59
  • Solspace's Date Field Filter is very tempting, but I'm using DropDate instead of EE's native date field, and I'd really prefer to keep it.
    – kmgdev
    Apr 17, 2013 at 18:31
  • I'm thinking Low Events might be a good solution, yeah?
    – kmgdev
    Apr 17, 2013 at 18:39
  • Date field filter may work on DropDate as well. It's really kind of like orderby="webinars_date" and then start_date="today". It doesn't take that form, but that's the idea. Apr 17, 2013 at 18:51
  • I haven't tried Low Events yet - depends on how sophisticated your event listing needs are. It's bound to be worth a look though. Everything he does is extremely well thought out. Apr 17, 2013 at 18:53

Are you sure it's not your {if webinars_date > current_time} conditional that is skipping entries?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.