i have a question about Register Fields via PHP and Workflow.
Right now, i see this ways.
– Setup the Fields and everything in the GUI/Backend and then export the PHP (and the json) and Copy Paste the PHP Code in your “functions.php”
– Just write the PHP by Hand.
Edit/Extend existing Fields
– Import the json, change everything, export php and json file again.
– Make the Changes yourself.
Right now, im not a fan of write the php code yourself, because the code can get very long. Lot of opportunity for typos.
The other way, with import json, make changes, export everything is safer, but inconvenient.
is there any other Way to do this? Plugin , webapp ?
I generally skip the PHP part. What I do is set up an acf-json file in the theme that I’m working on. When I’m done with a field group I move the json file for that field group to another folder and add a load point for that location. https://www.advancedcustomfields.com/resources/local-json/. I also usually have a site where I’m working on field groups and another site where those field groups are implemented. Whether or not I use PHP for a field group depends on if I need to make alterations to the fields, making the fields dynamic in some way, or if I need to be able to have the field labels and values be translatable. Might not be what you are looking for, but it is a different approach.