Created
June 24, 2014 16:03
-
-
Save joshfeck/119c6fdab12daf7f5b64 to your computer and use it in GitHub Desktop.
This code can be placed within a page template to display a list of events. Requires Event Espresso 3.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<ul class="course-list"> | |
<?php | |
if( function_exists( 'espresso_reg_url' )) { | |
global $wpdb; | |
$tablename = EVENTS_DETAIL_TABLE; | |
$courses = $wpdb->get_results("SELECT * FROM $tablename WHERE start_date >= '" . date('Y-m-d') . "' AND event_status <> 'D' ORDER BY start_date "); | |
foreach ( $courses as $course ){ | |
echo '<li><a href="' . espresso_reg_url($course->id) . '">' . stripslashes($course->event_name) . '</a></li>'; | |
} | |
} | |
?> | |
</ul> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment