Support

Account

Home Forums ACF PRO Register fields with php, The field groups are not visible in dasboard Reply To: Register fields with php, The field groups are not visible in dasboard

  • I am not sure what you mean by field groups not having all necessary information in the code. What is it that you think is missing?

    There simply is not any way that ACF can know what field groups are created in code and if by some chance this could be worked out there isn’t any way for ACF to make changes to PHP code where the field group is created.

    Maybe I am being dense, but I don’t see the reason behind having the field group in the ACF admin without the fields associated with that group. But if this is really what you want to do you could define the field group in the ACF admin and not add any fields to that group in the admin and then add all of the fields to the group by using acf_add_local_field(). But you cannot have the field group definition in the DB and in PHP because one would override the other. ACF will not add a field group from your PHP that already exists in the DB because it sees that it’s already created and ignores the request.