I’m trying to reduce the overloading by not to load all style sheets on my website’s homepage.
Some of those sheets is coming and loading from external plugins like woo-commerce,
I have tried to do that using `wp_dequeue_style` function, but it haven’t worked, those style sheets still being loaded!
For example, the first one is 100% not used:
When I use the code below:
function disable_plugins_style()
{
global $wp_styles;
wp_dequeue_style('style-rtl');
wp_deregister_style('style-rtl');
unset($wp_styles->registered('style-rtl'));
}
add_action('wp_enqueue_scripts', 'disable_plugins_style', 9999);
add_action('wp_head', 'disable_plugins_style', 9999);
It didn’t cause any affect, could I find someone can help me please.