Skip to content

Instantly share code, notes, and snippets.

@mannieschumpert
Last active December 12, 2015 10:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mannieschumpert/4760522 to your computer and use it in GitHub Desktop.
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.
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 );
@mannieschumpert
Copy link
Author

After having this up for a while, I just discovered that the Twenty Twelve style won't dequeue unless you also deregister it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment