Remove Font-Awesome MaxCDN Link & Load Locally

MaxCDN is slowing down my site so I want to load font-awesome locally but I can’t seem to write the correct function to remove it.

function remove_unwanted_css(){
wp_dequeue_style(‘font-awesome’, ‘https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css’);
}
add_filter(‘wp_print_styles’, ‘remove_unwanted_css’);

Read more here:: Remove Font-Awesome MaxCDN Link & Load Locally

Leave a Reply

Your email address will not be published. Required fields are marked *