kril-theme/functions.php
Holger Könemann 09b9392f06 unregister missing parent themes css thx to @sandilands
The child theme loads it´s own css file and don´t need the parent
themes css. But it uses the parent themes inc/enqueue.php file which
register and enqueued the parent themes css file from the child themes
directory. Caused a 404 request. Fixed with this changes.
2016-04-23 11:21:18 +02:00

14 lines
611 B
PHP
Executable file

<?php
function understrap_remove_scripts() {
wp_dequeue_style( 'understrap-styles' );
wp_deregister_style( 'understrap-styles' );
// Removes the parent themes stylesheet from inc/enqueue.php
}
add_action( 'wp_enqueue_scripts', 'understrap_remove_scripts', 20 );
add_action( 'wp_enqueue_scripts', 'theme_enqueue_styles' );
function theme_enqueue_styles() {
wp_enqueue_style( 'understrap-theme', get_stylesheet_directory_uri() . '/css/understrap-child.min.css', array());
wp_enqueue_script( 'understrap-main', get_stylesheet_directory_uri() . '/js/theme.min.js', array(), '0.1.0', true );
}