Building Sane, Reusable WordPress Templates with Timber and Twig
Traditional WordPress templates are written in PHP code that mixes HTML output with more advanced programming logic. The Timber plugin for Wordpress lets you move the markup part of your templates into separate files written in Twig, a simple yet powerful templating language. When you separate logic from layout in this way, your themes will be easier to read, easier to edit, and more portable.