Categories
Blog

Enjoyable WordPress theming with Timber (and ACF)

I was thinking of doing an in-depth tutorial on Timber. A few days since I started a draft, CSS-Tricks published “Timber and Twig Reignited My Love for WordPress“, which is a great read. However, I decided to push some of it live because this plugin deserves more love. I’ve built a lot of WordPress sites. Recently, it has become […]

Categories
Tips

Loop list in batches using Twig (or plain PHP)

Recently I had to loop through a series of elements in a WordPress template (thanks Timber), which happened to be using Bootstrap. If you ever used Bootstrap, you are familiar with the following markup: View the code on Gist. The problem here is very common. You have to: Loop every 3/4/n items. Insert a separator or […]