Support

Account

Home Forums Add-ons Options Page Add options page to network admin Reply To: Add options page to network admin

  • I just wrote a plugin to solve some of this without hacking the core. Please see:

    https://github.com/owlwatch/acf-multisite-options

    This allows you to create network options pages with the same ACF API, you just need to add a network attribute to the options when using acf_add_options_page or acf_add_options_sub_page. For example:

    
    acf_add_options_page([
        'network' => true,
        'post_id' => 'acf_network_options',
        'page_title' => 'Network Options',
        'menu_title' => 'Network Options'
    ]);
    

    I’m not sure what happened to my reply on this thread, so pardon me if this is a duplicate post.

    The values are stored in the ‘sitemeta’ table, so they are accessible across sites without needing to use the switch_to_blog function.

    @elliot – There is a lot of extra code that could be reduced if there were a filters in place in the acf_get_metadata, acf_update_metadata and acf_delete_metadata functions. Alternatively, this functionality could be built into the core fairly easily. If you are interested, I could create a pull request, but I would need to do so in the Pro repo.

    Hope this helps some people. I am using in a production site now and will make this plugin available on the WordPress directory once I’ve tested a bit more.