Support » Theme: Storefront » I cannot get child theme to work

  • Resolved musefleur

    (@musefleur)


    I am a newbie.

    This is the style.css I put in cPanel.

    [ Moderator note: code fixed. Please wrap code in the backtick character or use the code button. ]

    /*
    Theme Name: Storefront Child
    Theme URI: http://dailypaperflowers.com/storefront-child/
    Description: Storefront Child Theme
    Author: Viria
    Author URI: http://dailypaperflowers.com
    Template: storefront
    Version: 1.0.0
    License: GNU General Public License v2 or later
    License URI: http://www.gnu.org/licenses/gpl-2.0.html
    Tags: light, dark, two-columns, right-sidebar, responsive-layout, accessibility-ready
    Text Domain: storefront-child
    */

    And functions.php

    <?php
    
    /**
    * Loads the StoreFront parent theme stylesheet.
    */
    
    function sf_child_theme_enqueue_styles() {
    
    wp_enqueue_style( 'storefront-child-style', get_stylesheet_directory_uri() . '/style.css', array( 'storefront-style' ) );
    
    }
    add_action( 'wp_enqueue_scripts', 'sf_child_theme_enqueue_styles' );
    
    /**
    * Note: DO NOT! alter or remove the code above this text and only add your custom PHP functions below this text.
    */

    I don’t have the child theme activated on the website at the moment.

    What do I do to make it work? It doesn’t look like parent theme. What did I do wrong?

    Thank you so much.

Viewing 4 replies - 1 through 4 (of 4 total)
  • You can leave your functions.php file empty. Storefront automatically loads the child theme stylesheet.

    It doesn’t look like parent theme.

    In what way? Can you share a URL?

    Thread Starter musefleur

    (@musefleur)

    Here is what the child theme looks like

    View post on imgur.com

    My website is dailypaperflowers.com

    Thank you so much!

    I don’t understand, that looks exactly like the parent theme? Seems to be working fine.

    Thread Starter musefleur

    (@musefleur)

    I thought it would look like the parent theme that was customized.

    I tried customizing the child theme on editor but it made no effect.

    I don’t know what to do now. I am giving up.

    Thank you so much.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘I cannot get child theme to work’ is closed to new replies.