Overview of Timber and Twig integration
2.xTimber allows you to build WordPress themes by separating logic from presentation. Instead of using standard WordPress PHP loops, you pass data from PHP files to .twig files using the Twig Template Engine. This allows developers to focus on data/logic in PHP and designers to focus on HTML/display in Twig.
{% extends "base.twig" %}
{% block content %}
<h1 class="big-title">{{ foo }}</h1>
<h2 class="post-title">{{ post.title }}</h2>
<img src="{{ post.thumbnail.src }}" />
<div class="body">
{{ post.content }}
</div>
{% endblock %}