Support

Account

Home Forums ACF PRO Options Page field groups only working via PHP

Solving

Options Page field groups only working via PHP

  • Looking for a nod in the right direction here. I have an Options page registered through ACF. I have a field group assigned to that options page. When I edit values on the options page, they save just fine.

    However, I cannot access them via the normal get_field(‘name’, ‘options’); function.

    What I discovered was by exporting the field group to PHP and placing it in my functions.php file, I am able to access those fields. No other changes made. Removing PHP, leaving fieldgroup, fields no longer working on front end.

    No errors generated during any test.

    I dont mind keeping it in PHP, but this isn’t an issue I’ve ever had. Any ideas?

  • For reference, all other field groups on all other pages work without exporting to PHP. This only happens on any options page I test.

  • As a final followup, it does indeed wok fine using get_option();

    This made me think ACF wasn’t initialized yet, but this quick test works fine in the same place of code:
    if(function_exists(get_field)) echo ‘acf init’;

Viewing 3 posts - 1 through 3 (of 3 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.