Home Forums Add-ons Options Page Options Page Not Loading from .json?


Options Page Not Loading from .json?

  • I have ACF Pro bundled into my Custom WP Theme and followed the instructions here: Including ACF within a plugin or theme I set up a acf-json folder and resaved all my field groups and they all saved themselves into a .json files (6 total) as expected including my Options page included as well.

    So I pushed this out to my staging/dev website to test – all the field groups loaded except for the Options page for some strange reason? I now have the ability to sync up 5 field groups to the dev site but it should show (6) 1 for each of the .json files in my /acf-json/ folder. (My Options page is at /acf-json/group_60de1e5c…..json)

    Is there any know issues I should be aware of or am I missing something here? Here is my code if someone can examine it for me:

    Thanks for any help!

  • Did you try to load the json manually with the acf/settings/load_json filter?

    // Load ACF JSON for sync
    add_filter( 'acf/settings/load_json', function( $paths ) use ( $acf_path ) {
        // remove original path (optional)
        unset( $paths[0] );
        // append path
        $paths[] = $acf_path;
        // return
        return $paths;
    } );
  • I figured it out, I was also pulling in the options page via a php page and that’s why it wouldn’t load in the .json file.

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.