Support

Account

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

Solving

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: https://www.codepile.net/pile/Y0An7v1b

    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.