I tried putting your code in page.php, but it still does not work. Can I privately send you the file so that you can see what I’m doing wrong?
// Ensure the global $post variable is in scope
global $post;
// Retrieve the next 5 upcoming events
$events = tribe_get_events( array(
‘posts_per_page’ => 5,
‘start_date’ => new DateTime()
) );
// Loop through the events: set up each one as
// the current post then use template tags to
// display the title and content
foreach ( $events as $post ) {
setup_postdata( $post );
// This time, let’s throw in an event-specific
// template tag to show the date after the title!
the_title();
echo tribe_get_start_date();
the_content();
}