Skip to content
#

timber

Here are 266 public repositories matching this topic...

mengxilan
mengxilan commented Dec 12, 2018

override createMessage in LoggerPrinter like this:

1:
// return args == null || args.length == 0 ? message : String.format(message, args);
if (args == null || args.length == 0) {
return message;
}
String pattern = "(%\d)?$(a|b|c|d|e|f|g|h|n|s|tx)";
Pattern p = Pattern.compile(pattern);
Matcher m = p.matcher(message);
if (m.find()) {
return String.format(message, args);
} else {
t(me

gchtr
gchtr commented Mar 1, 2020

Ticket: #1434

There are some limitations when getting posts from other pages in a multisite network. Specifically, when you fetch posts from other blogs, you’ll have to prepare the data in advance.

The linked issue has a very good example for this, that I’ve run into myself, too. I think we should document that in a new Multisite Guide.

There’s also some functionality in the [`Timber

LeCanardNoir
LeCanardNoir commented Aug 22, 2019

I add just one line to get this tutorial working in the single.php file.

This is the tutorial part:

{% extends "single.twig" %}

{% block headline %}
    <h1><img src="/wp-content/uploads/2014/05/jareds-face.jpg" alt="Jared’s Mug"/></h1>
{% endblock %}

That the line i need to add in the single.php file:

marcinkrzeminski
marcinkrzeminski commented Oct 25, 2019

Add an option for a front-page.twig template in page.php.

Code is very similar to what we have in index.php

<?php
global $post;

$context   = \Timber\Timber::get_context();
$templates = [ 'page-' . $post->post_name . '.twig', 'page.twig' ];

if ( is_front_page() ) {
	array_unshift( $templates, 'front-page.twig' );
}
Timber::render( $templates, $context );

Improve this page

Add a description, image, and links to the timber topic page so that developers can more easily learn about it.

Curate this topic

Add this topic to your repo

To associate your repository with the timber topic, visit your repo's landing page and select "manage topics."

Learn more

You can’t perform that action at this time.