Support

Account

Home Forums Add-ons Options Page Copy option page to network sites

Solved

Copy option page to network sites

  • Hello, i’m working on a multisite network, and i’d like to be able to provide the exact same options page for every new child site I create.

    It seems I can’t easily duplicate the options page from one site to another : it seems I have to manually recreate the options page for EVERY new site (and that’s a real PITA, since I need many fields).

    My best guess is the easier way to do that would be to generate the options page and fields via my functions.php file so I can put it in every template, and let it work its magic for every new site.

    My question then : How can I get code (to put in my functions.php file) from the options page I created using ACF & Option page add-on ?

    Ideally, this code would :
    – take care of creating the options page
    – populate it with fields (those I created with the ACF plugin)

    (that would be quite similar to what the CPT UI plugin does : they let you create CPT’s using their plugin, and provide you a way to get code in case you’d rather use the functions.php)

    Any advice ?

    … but by any mean, if you have another approach to replicate my options page to every site on my network, i’d love to read that 🙂

    Thanks, and 1 million kudos for the stunning work you guys do, that plugin and its add-ons really make WP better.

    Cheers,
    Baptiste from France

  • Alright, nevermind, I found a solution, thanks to this topic :
    http://support.advancedcustomfields.com/forums/topic/adding-fields-using-functions-php/

    => In ACF menu, there is an export feature I had never noticed. (my bad).

    I used it to get PHP code for my fields group (options page), pasted it into functions.php and VOILA : it works as expected.

    Only tiny bug I noticed is it doesn’t handle accentuated characters

    Sorry for the noob question.

    … and glad to see once again how great ACF is !

    Cheers,
    Baptiste

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

You must be logged in to reply to this topic.