php - How to prevent local plugins from loading on Wordpress?

I recently tested my website on mobile and notecied terribleloading times
. I found out that these fonts were loading but aren't being used on the site itself:
wp-content/plugins/boostify-header-footer-builder/assets/fonts/ionicons.ttf
wp-content/plugins/elementskit-lite/modules/controls/assets/fonts/elementskit.woff?y24e1e
in addition to Googles:
https://fonts.gstatic.com/s/roboto/v20/KFOmCnqEu92Fr1Mu4mxK.woff2
https://fonts.gstatic.com/s/roboto/v20/KFOlCnqEu92Fr1MmWUlfBBc4.woff2
I don't use any of these and they take up almost 0,5 mb. How do I prevent them from loading?
Answer
Solution:
This seems to work.
function remove_fonts_stylesheet() {
wp_dequeue_style( 'google-fonts-roboto' );
wp_dequeue_style( 'elementskit' );
wp_dequeue_style( 'litespeedfont' );
}
add_action( 'wp_enqueue_scripts', 'remove_fonts_stylesheet', 999 );
Share solution ↓
Additional Information:
Link To Answer People are also looking for solutions of the problem: warning: a non-numeric value encountered in
Didn't find the answer?
Our community is visited by hundreds of web development professionals every day. Ask your question and get a quick answer for free.
Similar questions
Find the answer in similar questions on our website.
Write quick answer
Do you know the answer to this question? Write a quick response to it. With your help, we will make our community stronger.