[EventCalendar] Looking backwards in time?

Steve Logan steve at bigsmoke.com
Mon Oct 30 20:52:36 UTC 2006


Thanks Alex, you're quick!

I've tried your query_posts() example and I'm soooo close.  Here's my 
code...

(Note that my eventcalendar category is id=2 and that I want to filter 
results to only show from category $this_cat (the inner 'if'))

    <?php query_posts('cat=2&ec3_before=today&order=ASC'); ?>

    <!-- The Loop -->
    <?php if (have_posts()) : ?>
       <?php while (have_posts()) : the_post(); ?>		 

          <?php if ( in_category($this_cat) ) : ?>

               print things...

          <?php endif; ?>
       <?php endwhile; ?>
    <?php endif; ?>

If I do this I only get printed future events in reverse date order.

If I change the query to

    <?php query_posts('ec3_before=today&order=ASC'); ?>

then I'm closer in that I get previous as well as future events, 
correctly sorted in reverse date order.

How can ensure I ONLY get historical events?

And one last Q: how do I get at the event information for a post?

$post->ec3_something ??



Thanks again...

Steve




More information about the EventCalendar mailing list