30 days free. No credit card. Full access from the moment you connect your site.

Start free trial

Register ACF Block

blocks/register-acf-block declares an ACF block type, so a Gutenberg block backed by ACF fields becomes available in the editor.

It is a way to define and test a block, not a way to install one. Read the note on persistence below before you build anything on it.

At a glance

Abilityblocks/register-acf-block
ToolsetAdvanced Custom Fields — toolset/acf
GroupACF Blocks
RequiresAdvanced Custom Fields Pro
Capabilitymanage_options
SafetyWrites data
RepeatableNot idempotent — registering the same name twice is a collision, not a no-op
Ships inAcrossAI Abilities Manager 0.0.34 and later

What registration means here

ACF blocks are declared in PHP on every page load. They are not rows in the database, which means a registration made through this ability lasts for the current request only — unless the calling code re-registers it on every load.

That makes this the right tool for prototyping a block, checking how it appears in the inserter, or testing a supports configuration. It is the wrong tool for shipping one: a block you want permanently belongs in a plugin or theme file.

Call blocks/list-acf-blocks first. Registering a name that already exists collides with the block that owns it.

Input

NameTypeRequiredWhat it is
namestringYesBlock name. The acf/ prefix is added if you omit it.
titlestringYesHuman-readable title shown in the block inserter.
descriptionstringNoWhat the block is for, shown in the inserter.
categorystringNoBlock category, e.g. formatting, layout, widgets.
iconstringNoDashicon name or inline SVG.
keywordsarray of stringsNoSearch keywords for the inserter.
supportsobjectNoBlock supports, passed through to ACF unchanged.

What comes back

NameTypeWhat it is
blockobjectThe block as registered, with the values ACF resolved.
successbooleanWhether the call completed.
messagestringA one-line summary of what happened, suitable for showing a human.
error_codestringPresent only on failure — a stable machine-readable reason, such as a missing field, a wrong field type or an unmet confirmation.

Example

Ask your assistant:

Register an ACF block called pricing-table, titled “Pricing Table”, in the layout category, so I can see how it looks in the inserter.

It resolves to one call:

{
  "ability": "blocks/register-acf-block",
  "parameters": {
    "name": "pricing-table",
    "title": "Pricing Table",
    "description": "Three tiers with a feature list under each.",
    "category": "layout",
    "icon": "editor-table",
    "keywords": ["pricing", "plans", "tiers"]
  }
}

Worth knowing

  • Registration does not create the fields. Bind a field group to the block in the ACF admin — or check what is already bound with blocks/get-acf-block-fields.
  • Not idempotent: registering the same name twice in one request is a collision, not a no-op.
  • Requires ACF Pro.

Related abilities


Get the plugins:
AcrossAI Abilities Manager · AcrossAI MCP Manager

Browse the rest: Every ability, by category


Keep reading