Home › Forums › General Issues › Sync deleted fields with JSON? › Reply To: Sync deleted fields with JSON?
That explains a lot. ACF will not delete entire field groups if they are missing from the acf-json folder. What you are seeing is expected behavior. ACF will only save changes, load groups, and sync groups that exist in the folder.
I you want to automatically delete groups, I’m sure it would be possible, but you’d need to right custom code to detect the missing files and tell ACF to delete them. I don’t know of any examples of doing this or the code that would be involved, but basically you’d need to get a list of all the groups and see if there is a corresponding json file and if not then tell ACF to delete the group.
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.