Timber helps you create fully-customized WordPress themes faster with more sustainable code. With Timber, you write your HTML using the Twig Template Engine separate from your PHP files.
This cleans-up your theme code so your PHP file can focus on supplying the data and logic, while your twig file can focus 100% on the display and HTML.
Who is this for?
Timber is for both WordPress pros and rookies. People new to WordPress will like how it reduces the WordPress-specific knowledge required to theme a website. While pros can take advantage of object-oriented patterns that adhere to DRY and MVC principles.
What does the code look like?
With Timber you manage your theme in PHP and Twig (HTML) files. This separates the logic (getting stuff from WordPress) from presentation (adding tags, classes, etc.) — just like Rails, Django, Node and other platforms.
What does it look like?
Timber doesn't change the visual appearance of your theme. Installing Timber is like installing jQuery — it just gives you new tools to build and style it as you like.
Object Oriented Posts, Terms, Users and More
Speak to the common WordPress objects in a way that makes sense. Have you ever tried to get the thumbnail of a post?
The old way
Yuck! Maybe you can remember all those functions, but I sure can't. If you're a pro WordPress dev you probably have a mess of shortcut functions to help you with common tasks. But here's the rub: YOUR shortcuts are going to be different than everyone else's.
The Timber way
Use it a little, use it a lot
Timber works with your existing themes to unlock new power. You don't have to throw out everything you already have working.
The best tools evolve into your workflow: I didn't know I wanted to use jQuery or SASS until I started using them. Bit-by-bit they replaced the 'old' ways of doing things until I couldn't imagine life without them. Timber lets you start with just a bit. Say you want to just include an HTML snippet with a variable from your database: