Last active
November 17, 2015 19:37
-
-
Save pdmade/2a7dfac046a8ea1e829b to your computer and use it in GitHub Desktop.
Genesis loads the child theme stylesheet very early in the process. This will make sure you child theme's stylesheet loads after the parent theme.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Don't have Genesis load child theme styles | |
remove_action( 'genesis_meta', 'genesis_load_stylesheet' ); | |
//* Load parent stylesheet first, then load the child stylesheet | |
add_action( 'wp_enqueue_scripts', 'load_theme_scripts' ); | |
function load_theme_scripts() { | |
wp_enqueue_style( 'parent-style', get_template_directory_uri() . '/style.css', array(), CHILD_THEME_VERSION ); | |
wp_enqueue_style( 'child-style', get_stylesheet_directory_uri() . '/style.css', array( 'parent-style' ), CHILD_THEME_VERSION ); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment