Home › Forums › Feature Requests › Convert PHP register_field_group array to JSON › Reply To: Convert PHP register_field_group array to JSON
Why don’t you use json_encode() to create a JSON version of the array that you pass into register_field_group(), then all you need to do is create group key for the fields (I think it may have been the id field in previous versions), then create a json file following the acf conventions and drop it into your theme’s acf-json folder…
I have just done this and was able to sync the fields back into the database.
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.