- Whatever
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 | |
$context = Timber::get_context(); | |
$context['work'] = Timber::get_posts('post_type=work&numberposts=25'); | |
$context['posts'] = Timber::get_posts(); | |
Timber::render('index.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 | |
$test = function(){ | |
echo 'test works'; | |
}; | |
$test(); |
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 | |
/* mods/side-nav.twig */ | |
class __TwigTemplate_0a76428590b54c4ba53bab18b8522f90b76d43e3ebb0782a476f00875fbab93a extends Twig_Template | |
{ | |
public function __construct(Twig_Environment $env) | |
{ | |
parent::__construct($env); | |
$this->parent = false; |
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
$artists = Timber::get_posts($artist_args); | |
foreach( $artists as $artist ) { | |
$connected = new WP_Query( array( | |
'connected_type' => 'portfolios_to_artists', | |
'connected_items' => $artist, | |
'nopaging' => true | |
) ); | |
$artist->portfolios = Timber::get_posts($connected); | |
} | |
$data['artists'] = $artists; |
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 |
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
* { | |
box-sizing: border-box; | |
} | |
html, body, div, span, object, iframe, | |
h1, h2, h3, h4, h5, h6, p, blockquote, pre, | |
abbr, address, cite, code, | |
del, dfn, em, img, ins, kbd, q, samp, | |
small, strong, sub, sup, var, | |
b, i, |
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.get_field('my_field") }} |
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
Nice dfsd | |
dfasd |
OlderNewer