Support » Theme: SparkleStore » Child theme support

  • hi!

    I have been trying to make a child theme for this theme, but ignores the child theme’s style.css
    any ideas?

Viewing 1 replies (of 1 total)
  • @csib How are you trying to call the css?

    I have added this in functions.php and it loads the child css directly after the main style.css

    function child_enqueue_styles() {
    
        $parent_style = 'sparklestore-style';
    
        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', 'child_enqueue_styles' );
    
Viewing 1 replies (of 1 total)
  • The topic ‘Child theme support’ is closed to new replies.