Last active
December 12, 2015 10:39
-
-
Save mannieschumpert/4760522 to your computer and use it in GitHub Desktop.
An example of dequeueing a parent theme (in this case TwentyTwelve) to include your own.
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
function replace_twentytwelve_styles() { | |
wp_dequeue_style( 'twentytwelve-style' ); | |
wp_deregister_style( 'twentytwelve-style' ); | |
wp_enqueue_style( 'my-style', get_stylesheet_directory_uri() . '/css/style.css' ); | |
} | |
add_action( 'wp_enqueue_scripts', 'replace_twentytwelve_styles', 11 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
After having this up for a while, I just discovered that the Twenty Twelve style won't dequeue unless you also deregister it.