My parent theme (Starkers) adds a CSS file that I’m trying to remove (I want to use @import instead so I can override styles more easily). Starkers has the following in its functions.php:
add_action( 'wp_enqueue_scripts', 'script_enqueuer' );
function script_enqueuer() {
wp_register_script( 'site', get_template_directory_uri().'/js/site.js', array( 'jquery' ) );
wp_enqueue_script( 'site' );
wp_register_style( 'screen', get_template_directory_uri().'/style.css', '', '', 'screen' );
wp_enqueue_style( 'screen' );
}
I’ve tried the following in the child functions.php, but the link and script tags still show up in the head section.
add_action('init', 'removeScripts');
function removeScripts() {
wp_dequeue_style('screen');
wp_deregister_script('site');
}
I’ve double checked to see if they are hard coded in the parent header and they are not.