Created
April 25, 2017 14:25
-
-
Save trishasalas/50b5225ecf5d40db0e5bc8775fc71fdf to your computer and use it in GitHub Desktop.
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
function tribe_custom_loop() { | |
$events = tribe_get_events ( | |
array ( | |
'posts_per_page' => 5, | |
'start_date' => date( 'Y-m-d H:i:s' ) | |
) ); | |
foreach ( $events as $event ) { | |
$sdate = tribe_get_start_date( $event, false, 'M j' ); | |
//$elink = tribe_get_event_link( $event ); | |
$ecntry = tribe_get_country( $event ); | |
echo '<span class="date">' . $sdate . '</span>'; | |
echo $event->post_title; | |
echo '<span class="country">' . $ecntry . '</span>'; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment