[EventCalendar] 404 error when there are no future events (EC 3.1._pre14 and EC 3.1._pre15)

Steve Winton stevewinton at gmail.com
Wed Oct 4 13:34:38 UTC 2006


Hi all

What is the recommended way of avoiding the 404 error when using EC in 'Keep
Events Separate' mode and there are no future events scheduled?

Currently I've hacked my 404.php template file as follows:

  <?php
    global $wp_query;
    if ($wp_query->query_vars['cat'] = get_option('ec3_event_category')) :
  ?>
  <p>You were trying to access the events page, but there are currently no
  scheduled events!</p>
  <pre>
  <?php
    endif;
  ?>

But does anyone have a more elegant approach?

Thanks,
Steve
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://penguin.firetree.net/pipermail/eventcalendar/attachments/20061004/56d4b544/attachment.htm


More information about the EventCalendar mailing list