Skip to content

Instantly share code, notes, and snippets.

@caddoo
Created February 27, 2013 11:13
Show Gist options
  • Save caddoo/5047191 to your computer and use it in GitHub Desktop.
Save caddoo/5047191 to your computer and use it in GitHub Desktop.
<div class="entry">
<h3>&#9658; Upcoming events</h3>
<?php
$upcoming = new WP_Query(array(
'post_type' => 'event',
'posts_per_page' => -1
));
while( $upcoming->have_posts() ):
$upcoming->the_post();
?>
<strong><?php the_title(); ?></strong> <br/> Date: <em><?php echo td_meta_date_nice($post->ID, '_slt_event_date'); ?> - <?php echo td_meta_date_nice($post->ID, '_slt_event_date_end'); ?></em><br/> <a href="<?php echo get_permalink(); ?>">More details →</a><br/>&sim;
<?php
endwhile;
wp_reset_postdata();
?>
</div><!--end entry-->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment