Sync an ACF term field across a taxonomy

ContentIntermediate~15 min

Before you start

Advanced Custom Fields active with a field group attached to your taxonomy, content reads on, and the ACF write ability enabled for the write pass. The agent needs edit access to the terms it changes.

Term fields are the ones everyone forgets. You add an accent color, an icon, or a short blurb to your category field group, style the archive around it, and then half the categories never get their value filled in, so the archive falls back to a plain default for the ones nobody got to.

This walks the whole taxonomy for you, shows you which terms are blank or inconsistent, and fills the gaps once you approve them.

The prompt
I want every category in my [product] taxonomy to have its ACF [accent color] and
[icon] set, and right now they are hit or miss.
Start read-only. Pull the ACF field groups so we agree on the field keys, list
the terms in [product], and read the current ACF values on each term. Hand me a
table: term name, current color, current icon, and the value you propose for
anything blank or off-pattern. I will paste a reference list of the values I want
where you need one.
I decide what changes. After I approve, write the values back a few terms at a
time and show me each batch first. At the end, list every term you touched and
what changed on it so I can reverse any single one.

Why this is safe to run

The whole first pass is reads. Listing the field groups returns structure only, and listing the terms and reading each term’s ACF values writes nothing, so you see the full table of proposed changes before a single value is saved.

The write half reaches only the term fields you named, on only the terms in that taxonomy, and never touches a post filed under them. The ACF write ability stays off until you enable it, every call is checked against the capability of the user you bound the agent to, and every write lands in the Activity Log with the term it changed. Because the read pass captured the old values, reversing any term is just writing its old value back.

Already connected? You do not have to paste this. Ask your agent for the “sync an ACF term field across a taxonomy” recipe, or just describe the field you want filled in, and it runs the same read-first flow on your own site.

How it works

  1. List the ACF field groups so you and the agent agree on the term field keys.
  2. List the terms in the taxonomy and read the current ACF values on each one.
  3. Show a table of term, current value, and the proposed value for anything blank or off-pattern.
  4. Wait for your approval, then write the values a few terms at a time, pausing to show each batch.
  5. Return every term it changed with what changed so any single one can be reversed.

Questions

Does this touch the posts filed under each category?
No. It writes ACF values on the terms themselves, the category or tag records, not on any post assigned to them. The posts are never read or changed.
Can it create the taxonomy or the ACF field?
No. The taxonomy and the term field group have to exist already. The recipe only reads the terms and writes values into a field you built in ACF.