Sage and ACF plugin v. creating fields programmatically

Hello - very newbie question, so apologies in advance.

Regarding using ACF Pro and creating fields, etc, within the GUI or programmatically; I’ve read through a lot of this forum where people are using the various Git repo’s to use Sage and ACF. Is it necessary to do this, and to add the fields then programmatically, or it sufficient to use the ACF GUI as ‘normal’? Will that still work with Sage, and/or what are the benefits to coding the fields?

Hi @RobDobsonNC,

Sage and ACF will work together with no other integration; you can use the GUI to create and update fieldsets as normal.

One of the main benefits of declaring fields programatically is that you can check them into version control (eg. GIT). This means you can roll back changes, create feature branches containing fields that should not be present in the main branch, and you don’t need to worry about importing / exporting fields when cloning or setting up a new environment.

In my view, the effort required to code the fields is often worth it.

It’s worth mentioning that using a package like log1x/acf-composer with Sage has additional benefits, such as being able to create blocks using Blade templates, but this may be overkill depending on your use-case.

7 Likes

Dear @RobDobsonNC and @talss89 , ACF Windsor is also a great option for declaring fields programatically: GitHub - jofrysutanto/windsor: YAML-ised fields configuration for ACF

3 Likes