Dequeue fonts in WordPress


#1

Hello Friends,
I need your help to write a code to dequeue (or remove) .woff and .ttf fonts during site load.
Note: It’s a third party resource.


#2
function wp_font_removal() {
   wp_dequeue_style( 'google-fonts' );
}
add_action( 'wp_print_styles', 'wp_font_removal', 100 );

#3

Were you able to make remove the font as expected?


#4

It’s not working brother.
These are the fonts that I want to remove:

…/wp-contents/plugins/social-pug/assets/fonts/socialpug.woff
…/wp-contents/themes/…/roboto.ttf
…/wp-contents/themes/…/rise-icomoon.woff?6xplcw


#5

Can you share page URL where those existing right now?


#6

HI Brother, Please check your Personal Message.


#7

Okay, I am checking.