Last active
August 29, 2015 14:14
-
-
Save jarednova/38371080e115c14e8e19 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
$post = new TimberPost(); | |
$context['post'] = $post; | |
$category = $post->category(); // this will be a TimberTerm assuming there's 1 or more category assigned to this post | |
$query = array('posts_per_page' => 6, 'cat' => $category->ID, 'post__not_in' => array($post->ID)); | |
$context['latest'] = Timber::get_posts($query); | |
//the rest as you had it in your gist |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment