Create Gutenberg blocks from Twig templates and ACF fields.

0.1 2024-04-03 07:22 UTC

This package is not auto-updated.

Last update: 2024-07-11 09:11:54 UTC


Timber ACF WP Blocks

Generate ACF Gutenberg blocks just by adding templates to your Timber theme. This package is based heavily on this article by nicoprat and the plugin by MWDelaney.

Complete documentation

Read the complete documentation


This plugin is build with help of contributors:

Creating blocks

Add twig templates to views/blocks which get and use ACF data. Each template requires a comment block with some data in it:

  Title: Testimonial
  Description: Customer testimonial
  Category: formatting
  Icon: admin-comments
  Keywords: testimonial quote "customer testimonial"
  Mode: edit
  Align: left
  PostTypes: page post
  SupportsAlign: left right
  SupportsMode: false
  SupportsMultiple: false

<blockquote data-{{ }}>
    <p>{{ fields.testimonial }}</p>
      <span>{{ }}</span>

<style type="text/css">
  [data-{{ }}] {
    background: {{ fields.background_color }};
    color: {{ fields.text_color }};

Timber 2.0

Timber ACF WP Blocks is fully compatible with both Timber 1.x and Timber 2.x versions.