Create a gist now

Instantly share code, notes, and snippets.

Embed
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

This comment has been minimized.

Show comment
Hide comment
@mannieschumpert

mannieschumpert Apr 26, 2013

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

Owner

mannieschumpert commented Apr 26, 2013

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