Timber
About these Timber sections
If you’ve stumbled upon this page after searching for it on the internet, this might not be the thing you were looking for. Timber is a superset of Twig templating engine for WordPress and designed to make theme development easier. However, the examples and use cases that you will find here are NOT for theme development, but more for easier ‘snippet’ development and usage with either shortcodes or within page builders. If that’s what you came for, continue.
These pages serve as a guide to using Twig templates for outputting WordPress data in your Beaver Builder layouts. Where using regular PHP can be daunting, typically generates WSOD (white screen of death) when an error occurs and sometimes takes multiple function calls to output something basic, using Timber is intuitive, consistent and accessible.
You don’t need to use a Timber Theme to run a Timber template. All you need is the Timber Library plugin found in the WP Repo or the library found on Github to be able to use it.
Expected setup for the code examples
For all the examples in these pages we will assume you are using the Beaver Builder Page Builder, with Beaver Themer and of course the Toolbox for Beaver Builder plugin. After installing Timber Library plugin you will have access to the Timber Posts Module, where you can write the Twig template and benefit from the live reload to see exactly what happens.
Twig delimiters Whenever you create a Twig template you can use three
“Working with posts” is pretty broad when your talking about WordPress. An