Instantly share code, notes, and snippets.

What would you like to do?
List upcoming events
* Display a list of upcoming events with Event Organiser
* Snippet that produces a simple list of the next 5 upcoming events.
//Get upcoming '
$events = eo_get_events(array(
'showpastevents'=>true,//Will be deprecated, but set it to true to play it safe.
if( $events ){
global $post;
echo '<ul>';
foreach( $events as $post ){
<a href='<?php the_permalink() ?>'> <h5><?php the_title(); ?></h5></a>
on <?php eo_get_the_start('jS F Y'); ?>
<p><?php the_excerpt(); ?></p>
echo '</ul>';
echo 'No Upcoming Events';

This comment has been minimized.

rascode commented Feb 12, 2013

Thanks a lot for posting this. Was able to drop this in to feature the most recent events on the homepage of a project I'm currently working on.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment