Last active
August 29, 2015 14:22
-
-
Save ScottSmith95/749058498414e31379f5 to your computer and use it in GitHub Desktop.
Decode Replace Styles
This file contains hidden or 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
<?php | |
/* | |
* This functon allows a child theme to avoid incurring the performance penalty | |
* of using a CSS @import in a nearly empty child theme. | |
* Instead, use this function in the child theme's functions.php file and use | |
* a plugin like Jetpack to add Custom CSS to your theme. | |
*/ | |
function decode_child_styles() { | |
wp_dequeue_style( 'decode-style' ); | |
wp_enqueue_style( 'decode-main-style', get_template_directory_uri() . '/style.css' ); | |
} | |
add_action( 'wp_enqueue_scripts', 'decode_child_styles', 20 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment