Support

Account

Home Forums ACF PRO Add field programmatically to group Reply To: Add field programmatically to group

  • Hi @timm

    Thanks for the explanation.

    The field group registered via PHP is saved in the PHP file. This page should give you more idea about it: https://www.advancedcustomfields.com/resources/register-fields-via-php/.

    So when the page load, ACF will check if there’s a field registered in the PHP file. If they are, ACF will show it accordingly.

    But I think I know your goal now. I believe you want to add/modify a field group to the database, but via PHP code, right? In this case, you need to check the source code to see how ACF adds a new field. You can check the acf_update_field_group() function, which is located in “/wp-content/plugins/advanced-custom-fields-pro/api/api-field-group.php”.

    I hope this helps 🙂