Hi Max,
You may want to try hooking into the wp_enqueue_scripts
action and using wp_dequeue_script()
to remove the ‘open-sans-web-font’ stylesheet that we are enqueuing.
Thank You!
I tried to integrate the following functions into the functions.php of my child theme, but sadly they don’t work.
wp_dequeue_script('open-sans-web-font');
wp_dequeue_script('open-sans-web-font-css');
wp_dequeue_style('open-sans-web-font');
wp_dequeue_style('open-sans-web-font-css');
Are you sure that ‘open-sans-web-font’ is the matching script name ?
I heard about another solution but i’m not sure how to use it in this specific case.
Could it be the solution ?
function remove_inline_style() {
remove_action('wp_head', 'epic_header_style');
remove_action('wp_head', 'epic_admin_header_style');
remove_action('wp_head', 'epic_fonts');
}
add_action('init', 'remove_inline_style');
I don’t realy know what i have to write between the quotation marks(instead of ‘epic_fonts’)
Could you help me with that ?
That would be very nice 😉
For everyone strugglin with the same problem.
I added the following lines to my “functions.php” (of my child theme)
add_action( 'wp_enqueue_scripts', 'remove_default_stylesheet', 25 );
function remove_default_stylesheet() {
wp_dequeue_style( 'open-sans-web-font' );
wp_deregister_style( 'open-sans-web-font' );
}