Last active
August 29, 2015 14:13
-
-
Save jarednova/8a1ffa595fae8bfb25b7 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
Date is {{post.ee.event_start_date}} |
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
<?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); |
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
<?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