> For the complete documentation index, see [llms.txt](https://docs.acpt.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.acpt.io/dynamic-blocks/dynamic-blocks.md).

# Introduction

Build custom server-rendered Gutenberg blocks with TWIG templates and ACPT fields

Dynamic Blocks let you create fully custom, server-rendered Gutenberg blocks powered by TWIG templates. Unlike static blocks that save HTML to the database, dynamic blocks are rendered on every page load — which means they always reflect the latest data from your ACPT meta fields.

***

## What you can build

Dynamic Blocks are ideal for any situation where you need a reusable block that displays custom field data:

* **Post cards** — show a title, featured image, and excerpt from related posts
* **Event listings** — display date, location, and registration links from ACPT fields
* **Property cards** — render price, address, gallery, and amenities from meta boxes
* **Pricing tables** — output dynamic plans driven by custom fields
* **Author bios** — pull avatar, name, and bio from user meta
* **Configurable banners** — let editors control text, color, and CTA from the block sidebar

***

## How it works

```
Block Editor sidebar controls
         │
         ▼
   TWIG callback template
         │  (variables: controls + ACPT fields + WP globals)
         ▼
   PHP render_callback
         │
         ▼
   HTML output on the page
```

When a block is placed in the editor, WordPress calls the block's `render_callback`. ACPT passes the block's control values and all ACPT meta fields for the current post into a TWIG environment, renders your template, and returns the HTML.

***

## Prerequisites

Dynamic Blocks must be enabled before they appear in the admin menu.

Go to **Settings → Content settings** and toggle **Enable dynamic blocks**.

***

## In this section

| Page                                                                  | What it covers                                                                    |
| --------------------------------------------------------------------- | --------------------------------------------------------------------------------- |
| [Create your first block](/dynamic-blocks/create-your-first-block.md) | Step-by-step walkthrough of the block creation wizard                             |
| [TWIG reference](/dynamic-blocks/twig-reference.md)                   | All variables, functions, filters, and control-flow syntax available in templates |
| [Block controls](/dynamic-blocks/block-controls.md)                   | All 11 control types and how to use them in TWIG                                  |
| [Examples](/dynamic-blocks/examples.md)                               | Three complete, real-world block examples                                         |
