WP Tavern › Forums › Create Topic
David Dashifen Kees RE: PHP vs. Twig, I’ve used Twig within ACF blocks, often in conjunction with the Timber plugin. The PHP file that is used to display the block just needs to gather the data for the Twig template and then render it. It adds a bit more complexity (and two files, a PHP and a Twig, per block) but as Twig is pretty easy for folx to mess with, it’s been a good solution for me.
David Dashifen Kees
RE: PHP vs. Twig, I’ve used Twig within ACF blocks, often in conjunction with the Timber plugin. The PHP file that is used to display the block just needs to gather the data for the Twig template and then render it. It adds a bit more complexity (and two files, a PHP and a Twig, per block) but as Twig is pretty easy for folx to mess with, it’s been a good solution for me.
Name *
Email *
Website:
Topic Title (Maximum Length: 80):
Forum: — No forum —AI and WordPress Articles Blocks Showcase Discussions Events Introductions Jobs and Working in WordPress Podcast Episodes Site and Block Editor
Enter your email address to subscribe to this blog and receive notifications of new posts by email.
Email Address
Submit
Enter the destination URL
Or link to existing content