Home › Forums › General Issues › Sync deleted fields with JSON? › Reply To: Sync deleted fields with JSON?
If I had to build something like this where I knew I would never edit or manage field groups on the production site I would build a function that would do the checking and deleting as I mentioned above.
Another option might be, instead of deleting groups to mark them as inactive so that they will not be used, this would allow syncing.
Generally, I never delete a field group once I’ve created it.
To be honest, if I had a production site that will only use active JSON files then the field groups of that site would never be stored in the database and the only place the field groups would exist would be in the acf-json folder. I would delete all of the field groups from ACF admin and upload the acf-json folder and just let ACF use the field groups from there. However, this will not work if you’re also syncing the DB in some way.
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!
🤔 Curious about the ACF user experience? So are we! Help guide the evolution of ACF by taking part in our first ever Annual Survey and guarantee you’re represented in the results. https://t.co/0cgr9ZFOJ5
— Advanced Custom Fields (@wp_acf) May 8, 2023
© 2023 Advanced Custom Fields.
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 Cookie Policy. If you continue to use this site, you consent to our use of cookies.