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

Start free trial

Get ACF Field Value

Advanced Custom Fields does not store a field the way it looks on the edit screen. A repeater is one meta row per index per sub-field. An image is an attachment ID. A relationship is a serialised array of post IDs. Read those rows directly and you get storage, not values.

custom-fields/get-acf-field reads one field the way ACF itself would — through get_field() — from a post, a user, a term, a comment or the options store. What comes back is the hydrated value plus the field’s name, key, type and label, so an assistant knows what it is holding before deciding what to do next.

At a glance

Abilitycustom-fields/get-acf-field
ToolsetAdvanced Custom Fields — toolset/acf
GroupField Values
RequiresAdvanced Custom Fields (free edition is enough)
Capabilitymanage_options
SafetyRead-only — changes nothing
RepeatableIdempotent — running it twice leaves the same result
Ships inAcrossAI Abilities Manager 0.0.34 and later

How it works

Every ACF field is addressed by a selector: either the field name you see in the ACF admin (hero_title) or the underlying field key (field_abc123). Both work here. The name is the one a human recognises; the key is the one that survives a rename.

The target pair decides where to look. target_type: "post" with a post ID covers posts, pages and every custom post type. user, term and comment take their own IDs, and option reads the options store — the one place where target_id is optional.

Because the read runs through ACF, complex types come back in their proper shape: repeaters as arrays of row objects, flexible content with its layout names intact, post objects and relationships as real post data rather than bare IDs.

Input

NameTypeRequiredWhat it is
target_typestringNo — defaults to postWhat the value is attached to: post, user, term, comment or option. post covers pages and any custom post type.
target_idinteger | stringYes, for post, user, term and commentThe ID of the target. Optional for option, where it names a specific options page; omit it for the default options store.
selectorstringYesField name (e.g. hero_title) or field key (e.g. field_abc123). The name is what you see in the ACF admin.

What comes back

NameTypeWhat it is
fieldobjectThe field’s name, key, type, label and hydrated value.
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:

What’s in the hero_title field on post 412?

It resolves to one call:

{
  "ability": "custom-fields/get-acf-field",
  "parameters": {
    "target_type": "post",
    "target_id": 412,
    "selector": "hero_title"
  }
}

Worth knowing

  • Reading first is what makes a later write idempotent. Ask for the current value, compare, and skip the write when nothing would change.
  • A selector that names no field on the target returns a typed error rather than null, so a typo is visible instead of looking like an empty field.
  • Need everything at once? custom-fields/get-acf-fields returns every field on the target in a single call.

Related abilities


Get the plugins:
AcrossAI Abilities Manager · AcrossAI MCP Manager

Browse the rest: Every ability, by category


Keep reading