Show archive of past events?
-
Our client wants her site users to be able to see a full list of past events. Is this possible? If so, how would I go about doing that?
Currently we have a custom loop inside the events page template showing upcoming events, as follows:
<?php $news_query = new WP_Query(array('post_type' => 'sc_event', 'posts_per_page' => -1, 'orderby' => 'meta_value_num', 'meta_key' => 'sc_event_date_time', 'order' => 'ASC')); ?> <?php while($news_query->have_posts()) : $news_query->the_post(); ?> <?php if(get_post_meta($post->ID, 'sc_event_date_time', true) > time()) : ?> <article> <div class="post-image"> <?php the_post_thumbnail('post-image'); ?> </div> <div class="post-content"> <h2><?php the_title(); ?></h2> <?php the_content(); ?> <a class="more-link" href="<?php the_permalink(); ?>">View Event</a> </div> </article> <?php endif; ?> <?php endwhile; ?>
I’d like to be able to have a second loop under that showing past events. Is this possible with this plugin?
Any help on this is HUGELY appreciated. I’d love to continue using this plugin, as it would take hours to migrate all the events to a new plugin.
Thanks!
- The topic ‘Show archive of past events?’ is closed to new replies.