custom-fields/remove-acf-repeater-row deletes one row from a repeater or flexible-content field by its 1-based index, and renumbers what is left.
It goes through ACF’s own row deletion, so the row’s sub-field meta goes with it rather than being left orphaned under an index that no longer exists.
Before you run it
Removing a row deletes its values outright and cannot be undone. The call refuses without confirm: true. Indexes shift the moment a row goes, so an index you read a minute ago may now point at a different row — re-read the field if anything else could have changed it.
At a glance
| Ability | custom-fields/remove-acf-repeater-row |
| Toolset | Advanced Custom Fields — toolset/acf |
| Group | Repeater & Flexible Content |
| Requires | Advanced Custom Fields Pro, plus a repeater field registered on the site |
| Capability | manage_options |
| Safety | Destructive — deletes stored values, and refuses to run without confirm: true |
| Repeatable | Not idempotent — each call changes the row set, so re-running is not a no-op |
| Ships in | AcrossAI Abilities Manager 0.0.34 and later |
How it works
Rows after the removed one shift down by one. Removing rows 2 and 4 in that order removes the wrong second row: by the time the second call runs, what used to be row 5 is sitting at index 4.
The fix is to work from the highest index downwards, or to re-read the field between calls. There is no batch form precisely because the renumbering makes a batch ambiguous.
The confirmation gate runs before the field is touched, so a refused call leaves the site exactly as it was.
Input
| Name | Type | Required | What it is |
|---|---|---|---|
target_type | string | No — defaults to post | What the value is attached to: post, user, term, comment or option. post covers pages and any custom post type. |
target_id | integer | string | Yes, for post, user, term and comment | The ID of the target. Optional for option, where it names a specific options page; omit it for the default options store. |
selector | string | Yes | Repeater or flexible-content field name (e.g. cards) or field key. |
index | integer | Yes | 1-based row index, matching ACF’s own API. The first row is 1, not 0. |
confirm | boolean | Yes — must be true | The irreversibility gate. Without it the call is refused before anything is touched. |
What comes back
| Name | Type | What it is |
|---|---|---|
removed_index | integer | The index that was removed. |
row_count | integer | How many rows remain. |
success | boolean | Whether the call completed. |
message | string | A one-line summary of what happened, suitable for showing a human. |
error_code | string | Present 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:
Delete the third card from the features repeater on page 87.
It resolves to one call:
{
"ability": "custom-fields/remove-acf-repeater-row",
"parameters": {
"target_type": "post",
"target_id": 87,
"selector": "features",
"index": 3,
"confirm": true
}
}Worth knowing
- Not idempotent — a retry removes a different row, because the one you meant is gone and everything after it has moved up.
- Clearing every row at once is a different ability:
custom-fields/delete-acf-fieldempties the whole field. - Requires ACF Pro.
Related abilities
- Get ACF Field Value — confirm which row sits at which index
- Delete ACF Field Value — clear the entire field instead
- Remove Flexible Content Layout — the flexible-content equivalent
Get the plugins:
AcrossAI Abilities Manager · AcrossAI MCP Manager
Browse the rest: Every ability, by category