Skip to content

Instantly share code, notes, and snippets.

@corradomatt
Last active September 20, 2016 21:45
Show Gist options
  • Save corradomatt/5742cede151c0e5f8cbf01cf03c3cc5f to your computer and use it in GitHub Desktop.
Save corradomatt/5742cede151c0e5f8cbf01cf03c3cc5f to your computer and use it in GitHub Desktop.
Extending Timber\Post class issues... https://github.com/timber/timber/issues/1197
<?php
class MyPost extends Timber\Post
{
public function __construct()
{
parent::__construct();
}
}
<?php
use \Timber\Timber;
$context = Timber::get_context();
$post = Timber::get_post(null, 'MyPost');
Timber::render(array('single.twig'), $context);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment