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
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 | |
require_once('../plugins/timber-library/timber.php'); |
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
$context = Timber::get_context(); | |
$context['slides'] = Timber::get_posts('post_type=slides'); | |
$context['pages'] = Timber::get_posts('post_type=page&posts_per_page=2'); | |
$context['portfolio'] = Timber::get_posts('post_type=portfolio'); | |
$context['posts'] = Timber::get_posts(); //leave blank for default page query | |
Timber::render('front-page.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 | |
$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 | |
get_header(); | |
echo 'whatever'.get_the_title(); | |
the_content(); | |
$data = array(); | |
$data['post'] = new TimberPost(); | |
Timber::render('article-meta.twig', $data); |
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['galleries'] = Timber::get_posts(); | |
Timber::render('archive-gallery.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
{% for sub_post in TimberPost(post.get_field('my_repeater').sub_post) %} | |
<h2>{{sub_post.title}}</h2> | |
{% endfor %} |