-
Notifications
You must be signed in to change notification settings - Fork 68
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for ACF - Local JSON #254
Comments
Okay, thinking about how this could be done.. it is a tad bit tricky, but should be possible.. main thing would be to create it in the most "elegant" and re-usable way. Will try working on it when I have time. please, let me know if you have any ideas as well :) |
I wasn't sure about the best option yet; the only idea I had at the moment was changing directories through: acf/settings/save_json and acf/settings/load_json, so it is inside the theme folder. And then in the build theme, just do it in main folder. But that will be quite a hacky solution maybe.. |
@Maximilianos I 'fixed' this in my fork, but I was wondering about your ideal approach. If you agree with this method; I can create a pull request. In development mode, I change the location to the dev theme where they are saved in the acf-json folder. On build this acf-json folder is moved to the production theme and Advanced Custom Fields Pro can read it automatically. |
I'm interested in getting this working. Is there a place I can see the commit to your fork @iMicknl? It doesn't seem to be public |
@ginatrapani it was indeed a private fork. I just created a public fork and also did open a pull request. |
@iMicknl ah, thank you so much! So appreciated! |
It usually works very well. But I ran into problems when creating a new Field Group in ACF. Whenever I save, it creates a new JSON file and it's a mess. The workaround is to stop gulp while creating a new field group. |
Would it be possible to add support for the Advanced Custom Fields, Local JSON option? ACF is highly used by theme developers and this (pro) option is a must have. It dramatically speeds up ACF and allows for version control over the custom fields.
https://www.advancedcustomfields.com/resources/local-json/
Normally you would just create a directory acf-json in your current theme, where all the fields are saved in JSON format (and updated by every change). This is in this case not very easy, because it should then be in the current 'build' theme...
Any suggestions?
The text was updated successfully, but these errors were encountered: