- 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
{% if post.thumbnail %} | |
<img src="{{post.thumbnail.src}}" /> | |
{% elseif post.heroimage %} | |
<img src="{{post.heroimage.src}}|resize(300, 300)" /> | |
{% else %} | |
<img src="/wp-content/themes/mytheme/default-image.jpg" /> | |
{% endif %} |
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 |
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 | |
/* client-article.php */ | |
class ClientArticle extends TimberPost { | |
function writers(){ | |
return $this->get_terms('writers', true, 'ClientWriter'); | |
} |
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 | |
$data = Timber::get_context(); | |
$paged = (get_query_var('paged')) ? get_query_var('paged') : 1; | |
query_posts('posts_per_page=2&paged='.$paged); | |
$posts = Timber::get_posts(); | |
$data['posts'] = $posts; | |
$data['pagination'] = Timber::get_pagination(); | |
Timber::render('date.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
<h1>Congratulations to {{name}}</h1> | |
<p>You're really great so we're giving you a prize of {{prize}}</p> |
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 %} |
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
<?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['work'] = Timber::get_posts('post_type=work&numberposts=25'); | |
$context['posts'] = Timber::get_posts(); | |
Timber::render('index.twig', $context); |
OlderNewer