Skip to content

Instantly share code, notes, and snippets.

@ScottSmith95
Last active August 29, 2015 14:22
Show Gist options
  • Save ScottSmith95/749058498414e31379f5 to your computer and use it in GitHub Desktop.
Save ScottSmith95/749058498414e31379f5 to your computer and use it in GitHub Desktop.
Decode Replace Styles
<?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