I initially setup a lot of content that references an ACF flexible content field called ‘standard_elements’. I’ve since changed the name of the field to ‘custom_content’. Now, all old entries to the database reference the old field name, and all new content references the new field name. Causing an issue pulling this data into the front end.
I now understand that ACF doesn’t delete or auto rename any database content when a field name change is made, but I was wondering if I could do a find / replace on the database via phpmyadmin.
Would this action break ACF (after all, it would only be bringing old ‘hidden’ content back into ACF’s gaze)? And if not, what is the best way to make this change?
The only issue that you’re going to have with this solution is if 'old_field_name' is not unique. It will cause any field with the old name to also be changed. This is the main reason that it’s pretty much impossible to build field name changes into ACF and why it has never been done despite many requests.
Viewing 4 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic.
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users