How to remove <link rel='stylesheet' id='geowidget-4.5-css-css' href='https://geowidget.easypack24.net/css/easypack.css' type='text/css' media='all' /> in only for front-page and products pages.
I tried this code:
function remove_font_awesome() {
wp_dequeue_style('geowidget-4.5-css-css');
}
add_action ('wp_enqueue_scripts', 'remove_font_awesome', 9999);
add_action( 'wp_head', 'remove_font_awesome', 9999 );
I see still this css on all pages.
Answers:
Thank you for visiting the Q&A section on Magenaut. Please note that all the answers may not help you solve the issue immediately. So please treat them as advisements. If you found the post helpful (or not), leave a comment & I’ll get back to you as soon as possible.
Method 1
In a link element ids WP add -css, so you need to remove it.
May be this will help:
function remove_font_awesome() {
wp_dequeue_style('geowidget-4.5-css'); // not geowidget-4.5-css-css
}
add_action ('wp_enqueue_scripts', 'remove_font_awesome', 9999);
add_action( 'wp_head', 'remove_font_awesome', 9999 );
All methods was sourced from stackoverflow.com or stackexchange.com, is licensed under cc by-sa 2.5, cc by-sa 3.0 and cc by-sa 4.0