Support

Account

Home Forums Add-ons Options Page echo local field group

Helping

echo local field group

  • 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.

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.

We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Cookie Policy. If you continue to use this site, you consent to our use of cookies.