Some time ago I wrote the official Timber Documentation on ACF Blocks. Now I’ll show you how to do it in a much easier manner.
Before we start we need to do two things:
The best way to install the mentioned library is of course via Composer.
In case you don’t like the views/blocks folder you can change it by using timber/acf-gutenberg-blocks-templates filter.
In our views/blocks folder we create a twig file (in this example — owl-link.twig) and on top of it, we add some additional comments…
Today there won’t be any code — just a short story about how we can help others.
It all began with one task — I had to add one shortcode for a service I was developing. Nothing less, nothing more. After I finished it I thought that maybe I’ll add the OEmbed functionality, so the blog authors could insert content in an easier manner.
After doing it I thought that I have a nice material for a plugin (especially that 360player.io …
More than a year ago — Timber has become one of the basic tools I use in every WordPress based project. Here I’ll try to show you why.
The most basic definition would be that it’s just Twig for WordPress. But that’s not entirely true. Timber also adds many cool features like integrations with plugins (ACF, co-authors or WooCommerce) and filters for easy image resizing and manipulation.
When you use Timber you have to separate logic from the view. …