Skip to content

Instantly share code, notes, and snippets.

@jarednova
Last active August 29, 2015 14:13
Show Gist options
  • Save jarednova/8a1ffa595fae8bfb25b7 to your computer and use it in GitHub Desktop.
Save jarednova/8a1ffa595fae8bfb25b7 to your computer and use it in GitHub Desktop.
Date is {{post.ee.event_start_date}}
<?php
include_once('timber-event-espresso.php');
$context = Timber::get_context();
if (is_event_espresso_single()) { //psudo code
$context['post'] = new TimberEventEspresso();
}
Timber::render('event.twig', $context);
<?php
class TimberEventEspresso extends TimberPost {
public function ee() {
$id = $this->ID;
$ee = new EE_Event($id); //whatever you do to delcare a new EE_Event based on ID. This is psudo code
$this->ee = $ee;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment