WordPress: Dequeue scripts in child theme

Here is an example code to dequeue  the styles and scripts of the parent theme in a child theme:

function wpyaml_scripts_styles() {
	global $wp_styles;

	wp_dequeue_style('twentytwelve-fonts');
	wp_dequeue_style('twentytwelve-ie');

}

add_action( 'wp_enqueue_scripts', 'wpyaml_scripts_styles' ,100);

Sven Wappler

Webentwickler, TYPO3ler, Hobby-Fotograf

Das könnte Dich auch interessieren...

Schreibe einen Kommentar