PHP-first
Define blocks with arrays, render with callbacks. No React, no JSX, no webpack. Your WordPress workflow, unchanged.
WordPress Plugin
Create native Gutenberg blocks entirely in PHP. No React, no JSX, no build step. 30+ field types out of the box.
Describe your fields as arrays. Define Blocks generates the full editor UI — content area, sidebar panels, toolbar controls.
define_block_type( 'theme/hero', [
'title' => 'Hero',
'icon' => 'cover-image',
'schema' => [
[
'scope' => 'content',
'fields' => [
'heading' => [ 'type' => 'text' ],
'text' => [ 'type' => 'richtext' ],
'image' => [ 'type' => 'media' ],
]
],
[
'scope' => 'inspector',
'panel' => 'Layout',
'fields' => [
'layout' => [
'type' => 'select',
'options' => [ 'default', 'wide', 'split' ],
],
'overlay' => [
'type' => 'range',
'min' => 0,
'max' => 100,
],
]
],
],
'render' => 'theme_hero_render',
]);
function theme_hero_render( $attributes ) {
$v = $attributes['values'];
$img = wp_get_attachment_image_url(
$v['image'], 'full'
);
ob_start();
?>
<section class="hero">
<img src="<?= esc_url($img) ?>">
<div class="hero__content">
<h1><?= esc_html($v['heading']) ?></h1>
<?= $v['text'] ?>
</div>
</section>
<?php
return ob_get_clean();
}
Everything you need to build production blocks, nothing you don't.
Define blocks with arrays, render with callbacks. No React, no JSX, no webpack. Your WordPress workflow, unchanged.
Place fields in the content area, sidebar panels, advanced section, toolbar, or toolbar dropdowns. Your blocks feel native.
Show and hide fields dynamically with a rich expression syntax. Equality, comparison, boolean logic, array inclusion, substring matching.
Repeaters with drag-and-drop reorder. Groups for nested objects. Tabpanels for organized editing. InnerBlocks for composability.
See the server-side render live in the editor, scoped CSS included. Toggle between editing fields and previewing output.
Register custom field types from external plugins. Filter blocks, schema, and rendering with standard WordPress hooks.
From simple text inputs to maps and media crop. Ready to use, zero configuration.
Fields appear and disappear based on other field values. One string expression, no callbacks.
'show' => 'has_overlay' Truthy check'show' => '!has_overlay' Negation'show' => 'layout == "split"' Equality'show' => 'count > 3' Numeric comparison'show' => 'has_cta && layout != "minimal"' Boolean logic'show' => 'country in ["IT", "FR", "DE"]' Array inclusion'show' => 'slug contains "hero"' Substring'show' => '$index > 0' Repeater-aware