Hi,
I have version 4.4.11 of your plugin, and I try to register fields via php code.
So I just read this docs:
https://www.advancedcustomfields.com/resources/register-fields-via-php/
And it didn’t work. So I realize that the function acf_add_local_field_group()
doesn’t exist in the plugin, no local.php
file is located under the core folder.
However, there is some other function called register_field_group()
that does work. Why is that? My plugin is at it’s latest version. It is good to use the old function instead?
Thanks in advance!
The documentation here is for ACF version 5 (Pro) and it appears that the documentation for V4, the free version on WP, has bee removed.
Yes, you need to use the function register_field_group() instead of acf_add_local_field_group(). Use the export to code feature for a field group and you’ll see how it works.