Ollie Block Academy

Types of Blocks

What is a dynamic block

Dynamic blocks generate frontend output through PHP functions rather than storing HTML in the database. Only placeholders and minimal configuration data are saved, while actual content is created on each page render.

The latest posts block demonstrates this pattern – the editor shows a JavaScript-rendered preview while the database contains only a placeholder comment. PHP callbacks handle all frontend rendering dynamically.

Dynamic blocks omit save functions entirely, letting WordPress handle the placeholder storage. The edit function provides editor interface while the PHP render callback generates all frontend output with access to current data.

Back to: Ollie Block Academy > Types of Blocks