How do I display the fields generated in function php?
On my MultiSite I decided to make one field for all subdomains. To do this, in function.php wrote this:
if( function_exists ('acf_add_local_field_group') ) {
acf_add_local_field_group($array);
}
Fields in the admin panel appeared, but I can not understand how I can display them. The usual way “get_field(‘fieldName’, ‘option)” I get null. In the database, the fields are filled.
Any ideas?
Important moment! Does not work only with the options_page type. That is, if I create a field for other pages in this way, everything works fine(checked only with the text field and true_false)
Content must exist in the fields on the site. You need to go to the options page update.