[Plugin: The Events Calendar] Querying for Upcoming and Past events: both showing all events
-
Here’s the markup:
<h1>Upcoming Events</h1> <?php $upcoming_query = new WP_Query('cat=4&eventDisplay=upcoming'); ?> <?php while ($upcoming_query->have_posts()) : $upcoming_query->the_post(); ?> <div class="post" id="post-<?php the_ID(); ?>"> <h3><?php the_title(); ?></h3> <div class="entry"> <span class="the-date"><?php echo the_event_start_date(); ?></span> <?php the_content('Read the rest of this entry »'); ?> </div> </div> <?php endwhile; ?> <h1>Past Events</h1> <?php $past_query = new WP_Query('cat=4&eventDisplay=past'); ?> <?php while ($upcoming_query->have_posts()) : $upcoming_query->the_post(); ?> <div class="post" id="post-<?php the_ID(); ?>"> <h3><?php the_title(); ?></h3> <div class="entry"> <span class="the-date"><?php echo the_event_start_date(); ?></span> <?php the_content('Read the rest of this entry »'); ?> </div> </div> <?php endwhile; ?>
But both lists are just showing all events … I can’t find any support for using custom queries … thoughts or suggestions?
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘[Plugin: The Events Calendar] Querying for Upcoming and Past events: both showing all events’ is closed to new replies.