Home>Support>Firefox Can’t Load My Child Theme’s CSS File

Firefox Can’t Load My Child Theme’s CSS File

Notice: This thread is over two years old; the information may be outdated. Please consider creating a new thread if you require free support. If you have an active SiteOrigin Premium license, you can email our premium support desk at [email protected].

style.css in my child theme folder:
/*
Theme Name: Vantage Child
Author: SiteOrgin
Template: vantage
Version: 1.0.0
*/
@import url(“../vantage/style.css”);
/* =Theme customization starts here
————————————————————– */

I’ve also created functions.php in my child theme folder:
<?php

add_action( 'wp_enqueue_scripts', 'enqueue_theme_styles' );
function enqueue_theme_styles() {
wp_enqueue_style( 'parent-style', get_template_directory_uri() . '/style.css' );
wp_enqueue_style( 'child-style', get_stylesheet_uri(), array( 'parent-style' ) );
}

But firefox still can't load child theme's css, but Chrome does.

Please, help me fix this problem :)

Thank you in advance !

URL: http://www.congtydietmoi.com.vn/

This is our free support forum. Replies can take several days. If you need fast email support, please purchase a SiteOrigin Premium license.

  1. 10 years, 7 months ago Andrew Misplon
    Hi, I Work Here

    Hi Tin

    You’ll need to either import the parent stylesheet via CSS @import OR via the functions file, but not both. Importing via the functions file and enqueuing your new stylesheet would look as follows:

    <?php
    
    /**
     * Enqueue the parent theme stylesheet.
     */
    
    add_action( 'wp_enqueue_scripts', 'vantage_parent_style' );
    function vantage_parent_style() {
        wp_enqueue_style( 'parent-theme', get_template_directory_uri() . '/style.css' );
    }
    
    /**
     * Enqueue the child theme stylesheet.
     */
    
    add_action( 'wp_enqueue_scripts', 'vantage_child_style', 20 );
    function vantage_child_style() {
        wp_enqueue_style( 'child-theme', get_stylesheet_uri() );
    }
    
  2. 10 years, 6 months ago Tin Le

    I’ve pasted your code into my child’s function.php and removed @import url(“../vantage/style.css”);

    Chrome & Safari can load the child theme’s css file but Firefox and IE can’t.

    Could you please inspect into my site congtydietmoi.com.vn to figure it out.

    Thanks Andrew in advance,

  3. 10 years, 6 months ago Jean-Jacques Schaeffer

    Hi Tin le,
    I’m working with firefox. I’ve also a vantage-child with style.css, like you.
    Without functions.php, it works well.
    Try perhaps to remove functions.php to see how it works…
    Cordially

Replies on this thread are closed. Please create a new thread if you have a question, or purchase a SiteOrigin Premium license if you need one-on-one email support.

Get The Most Out of SiteOrigin with SiteOrigin Premium

Find Out More