Support » Theme: Storefront » How do I make my child theme inherit Storefront’s personalization options?

  • Resolved Ezequiel

    (@ezequiel6arrido)


    Hi, I’ve made a child theme for Storefront, but sadly this has been an after thought, so the actual Storefront theme has been personalized (Logo, background, theme options in general).

    I would like my child theme to inherit these options, is this possible in any fashion?

    Here’s the current functions.php of my child theme.

    function my_theme_enqueue_styles() {
    
        $parent_style = 'storefront-style'; // This is 'twentyfifteen-style' for the Twenty Fifteen theme.
    
        wp_enqueue_style( $parent_style, get_template_directory_uri() . '/style.css' );
        wp_enqueue_style( 'child-style',
            get_stylesheet_directory_uri() . '/style.css',
            array( $parent_style ),
            wp_get_theme()->get('Version')
        );
    }
    add_action( 'wp_enqueue_scripts', 'my_theme_enqueue_styles' );

    Thanks!

Viewing 5 replies - 1 through 5 (of 5 total)
  • Ezequiel

    (@ezequiel6arrido)

    Is there any more info I should provide in order to solve this problem?

    Joel Williams

    (@joelwills)

    Automattic Happiness Engineer

    Hi there!

    Do you want in inherit what the values are actually set to? i.e. keep the same logo, color settings?

    I’m not sure a child theme can take these settings as they are theme specific. In fact there are plugins to export/import the customizer settings to get around this:

    https://wordpress.org/plugins/customizer-export-import/

    Hope that helps!

    Ezequiel

    (@ezequiel6arrido)

    Thank you very much Joel, I’ll try that and then I’ll get back to you.

    Ezequiel

    (@ezequiel6arrido)

    It worked! This was exactly what I needed. Thank you Joel!

    Joel Williams

    (@joelwills)

    Automattic Happiness Engineer

    Great, I’m glad 🙂

    All the best!

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘How do I make my child theme inherit Storefront’s personalization options?’ is closed to new replies.