This thread is over two years old and may be outdated. Please create a new thread if you need help, or email us if you have an active Premium license.

Child Theme CSS Not Working After 1.0.6 Update

Resolved 4 replies technicalthemetheme-unwind
8 years ago · Last reply by zicara 8 years ago

The child theme CSS for Unwind is no longer working.

style.css

/*
Theme Name: Unwind Child
Author: SiteOrigin
Author URI: http://siteorigin.com/
Theme URI: https://siteorigin.com/theme/unwind/
Description: Unwind Child Theme
Version: 1.0.0
Template: siteorigin-unwind
Text Domain: siteorigin-unwind
Domain Path: /languages/
*/

funtions.php

<?php

/**
 * Enqueue the parent theme stylesheet.
 */

function unwind_child_enqueue_parent_style() {
    wp_enqueue_style( 'unwind-parent-style', get_template_directory_uri() . '/style.css' );
}
add_action( 'wp_enqueue_scripts', 'unwind_child_enqueue_parent_style', 8 );

This is our free support forum. Replies can take several days.

Need fast email support? Get SiteOrigin Premium

Replies

4
  1. Alex S Staff 8 years, 10 months ago

    Hi Zicara,

    Please try replacing your functions.php with:

    <?php
    
    /**
     * Enqueue the parent theme stylesheet.
     */
    
    function unwind_child_enqueue_parent_style() {
    	wp_enqueue_style( 'unwind-parent-style', get_template_directory_uri() . '/style.css' );
    	wp_enqueue_style( 'unwind-child-style', get_stylesheet_uri(), array( 'unwind-parent-style' ) );
    }
    add_action( 'wp_enqueue_scripts', 'unwind_child_enqueue_parent_style', 8 );
    
  2. zicara 8 years, 10 months ago

    Thank you for the quick response Alex! The unwind child css is loading now, but it is loading before the parent’s minified css.

    <link rel='stylesheet' id='unwind-parent-style-css'  href='/wp-content/themes/siteorigin-unwind/style.css?ver=4.7.3' type='text/css' media='all' />
    <link rel='stylesheet' id='unwind-child-style-css'  href='/wp-content/themes/unwind-child/style.css?ver=4.7.3' type='text/css' media='all' />
    <link rel='stylesheet' id='siteorigin-unwind-style-css'  href='/wp-content/themes/siteorigin-unwind/style.min.css?ver=1.0.6' type='text/css' media='all' />
    <link rel='stylesheet' id='siteorigin-google-web-fonts-css'  href='//fonts.googleapis.com/css?family=Lato%3A300%2C400%7CMerriweather%3A400%2C700&ver=4.7.3' type='text/css' media='all' />
    
  3. Alex S Staff 8 years, 10 months ago

    Hi Zicara,

    That’s odd. Try:

    <?php
    
    /**
     * Enqueue the parent theme stylesheet.
     */
    
    function unwind_child_enqueue_parent_style() {
    	wp_enqueue_style( 'unwind-child-style', get_stylesheet_uri(), array( 'siteorigin-unwind-style' ) );
    }
    add_action( 'wp_enqueue_scripts', 'unwind_child_enqueue_parent_style', 11 );
    
  4. zicara 8 years, 10 months ago

    That worked. Thank you!

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.

Have a different question or issue?

Start New Thread