Site logo

[Support request] Child theme

Home Forums Support [Support request] Child theme

Home Forums Support Child theme

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #2529174
    Anil

    Hi

    I have configured this site with GPP using

    5 elements
    custom css in Simple CSS
    6 active snippets in Code Snippets
    and GP Customisation.

    I like to replicate this on more than 20 domains.

    Replicating this way is time consuming, can you please guide to build one child theme with all above settings,
    and uploading and activating child theme would be easier task …

    Please guide…

    #2529377
    David
    Staff
    Customer Support

    Hi Anil,

    moving Simple CSS ( styles.css ) and Code Snippets ( functions.php ) into a child theme is simple.
    Moving Customizer Settings and Elements is not.
    Customizer settings are saved in an options table, so that would require a separate integration.
    And Elements are a Post Type so those would need importing into the site as per any other post type.

    The simplest method would be to use a plugin such as this one:

    https://wordpress.org/plugins/duplicator/

    Then you can just create an export package, and import it into your other domains.

    #2529979
    Anil

    Thanks David for guidance, i’ll try this…

    #2530159
    Anil

    Hi David, I tried duplicator, but not useful to just exporting needed stuff.

    1. Simple css can be copied and paste into child theme css — possible.
    2. Code snippets into functions.php — possible.

    3. Customizer settings:
    a. 1st option : export and then import into another site
    b. 2nd option : Customizer settings are saved in an options table — can you please further guide…

    4. Elements: (GPP’s unique featue & proprietorship)
    a. 1st option : Can wp-admin/export.php and import be of any help here…
    b. 2nd option : exporting from mysql-table needed rows and then importing them.
    c. 3rd option : converting elements into php code like in Code snippets or in functions.php — can you please further guide… (SOLVED)

    Warm regards.

    P.S. : Can there be any possibility to make a package like importing a site from site library ? Actually it is doing all these things…

    Well, after posting this, I tried and converted elements into php codes as they were some hooks… (except generateblocks)

    Now, only issue is to get Customizer settings in child theme, please advise…

    I think this is to be managed with re-declaring defaults…. or serialising and storing in options table…

    #2530849
    Fernando
    Customer Support

    Hi Anil,

    3. What David is saying is that in comparison to CSS and PHP which can be stored in the files of a Child Theme, customizer settings are stored in the Database. This is why David suggested using a plugin for ease of “export and import”. You could also try using a different plugin.

    Your first option would do as well but you would need to import it manually to all 20 sites one by one. Reference: https://docs.generatepress.com/article/import-export-overview/

    4. In the same way, Element data are also stored in the database. You would need to export and import them as well.

    Package-wise, you can just use an import-export plugin. One commonly used is All-in-One WP Migration: https://wordpress.org/plugins/all-in-one-wp-migration/

    This should work in the same way that Site Library template importation works.

    You could also try using PHP to alter some customizer defaults.

    References:

    https://docs.generatepress.com/article/option_generate_settings/
    https://docs.generatepress.com/article/option_generate_secondary_nav_settings/
    https://docs.generatepress.com/article/option_generate_menu_plus_settings/
    https://docs.generatepress.com/article/option_generate_blog_settings/
    https://docs.generatepress.com/article/option_generate_woocommerce_settings/

    What we would recommend is using a migration tool instead.

Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.