@howtuu @schlessera @aaronjorbin @TimberWP Tried it and wasn’t a fan. I like to gather my data in PHP and use Twig to join the data with HTML. Timber duplicates a lot of the PHP logic in Twig itself.
We ❤️ the web! If you do too then come join us. Southampton or remote (UK).
You’ll:
– work with #WordPress, @TimberWP, Lumberjack & @wp_acf
– balance visual design, a11y, performance & technical SEO
– contribute to open source
– be part of a great team
@pressingfm @wpmark @TimberWP Anyhoo I have way more thoughts on this than can fit in tweets. I would love to be on the show and vouch for Twig templating.
@pressingfm @wpmark @TimberWP I still like to use WordPress’ template hierarchy so it is familair to other devs. I just collect the data in PHP and pass it to the Twig template to be rendered. Here’s a simple demo theme to show it in action github.com/kingkool68/sprig-demo…
@pressingfm @wpmark @TimberWP I do like using Twig templates for rendering HTML from data. I created a small plugin to integrate Twig with WordPress and use a few filters for escaping. github.com/kingkool68/sprig
@pressingfm @wpmark @TimberWP Timber is weird to me as a lot of it is duplicating PHP logic in another form. That really turned me off.
@colin_howells @TimberWP Then I read carlalexander.ca/designing-class… from @twigpress and it clicked that you want to pass data to function and let it render the data into a template so it can be reuseable and not tied to WordPress post. It can be reused with different data dynamically or statically.
@colin_howells Then I realized all of the places I’ve seen it being used (like @TimberWP ) is the same way as using inline PHP but a different language. There was a lot of work done to make Twig versions of PHP things and it was really weird to me.