I do not know of you’ve figured this out yet or not, but I don’t see anything wrong in your add_local_field() code. The only thing I can come up with is that your query is not returning what you think it should be returning.
2022 was a big year for Advanced Custom Fields, with more capabilities, a new generation of ACF Blocks, a refreshed UI, and a new home. Our year in review post looks at advancements we’ve made and offers a glimpse of the future. https://t.co/HahJUCcyH4