timber/starter-theme

need a little modification in the single.php file.

LeCanardNoir opened this issue · 1 comments

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:

'single-' . $timber_post->slug . '.twig',

In this part of single.php file:

Timber::render(
	    array(
	        'single-' . $timber_post->ID . '.twig',
                'single-' . $timber_post->post_type . '.twig',
                'single-' . $timber_post->slug . '.twig',
                'single.twig'
        ),

I post this just to help any body with that tutorial, because this librairy "TIMBER" is awesome, thank good work.

Thanks @LeCanardNoir — really glad to hear you've been able to use Timber successfully! Do you want to submit this as a PR? That way, your name will live in GitHub contributor infamy!