ACF JSON is a great tool for version-controlling, deploying, and syncing ACF field groups across installations. Sometimes, however, having just the one acf-json
dir can feel like a limitation.
Fortunately, ACF allows us to register multiple load points which makes it possible to move ACF JSON files wherever they make the most sense.
Use this snippet to load an additional directory for your ACF JSON files.
Let’s say you have multiple directories containing ACF JSON definitions that you’d like to load your fields from. You can easily do this by registering multiple load points.
ACF won’t save field updates to the load points. If the field group’s JSON file has been manually moved to a custom load point and the field group is updated in the WordPress admin, a new JSON file will be created in ACF’s JSON save directory.
This site was created by Hookturn, the team behind ACF Theme Code Pro. If you are interested in contributing or have an extension to add, email us.
Awesome ACF is sponsored by the very awesome team at Pressidium. If you need reliable, secure and scalable Managed WordPress Hosting, check them out.