Remove MAXCDN link/load font awesome locally


Hi there BB Team -

I understand that font awesome can load locally, however I’m unable to remove the <link id=“font-awesome-css” href=“” rel=“stylesheet” type=“text/css” media=“all”> via functions.php in my child theme without removing FA entirely.
For performance reasons, I want to load FA locally rather than across the CDN.

I’ve searched here and online and haven’t been able to find an exact answer.




Hey Samuel!

You should be able to dequeue the CDN font-awesome by using the code below. Give it a shot and let us know how it goes.

function remove_unwanted_css(){
add_filter('wp_print_styles', 'remove_unwanted_css');



Thanks Jun.
I ended up doing it like this, after downloading the latest FA to a new folder called fonts:

function add_font_awesome2()
wp_enqueue_style( ‘style’, get_stylesheet_uri() );
wp_enqueue_style( ‘font-awesome2’, ‘/wp-content/fonts/css/font-awesome.min.css’ );
add_action( ‘wp_enqueue_scripts’, ‘add_font_awesome2’ );

function remove_unwanted_css(){
wp_dequeue_style(‘font-awesome’, ‘’);
add_filter(‘wp_print_styles’, ‘remove_unwanted_css’);

End result: halved my average page loading time

closed #4