Archived topic
How to load font awesome from CDN
1 reply · Started by tobymiguel on August 13, 2016
Viewing posts 1–2 of 2
Hi
How can I load font awesome from a CDN?
I have tried a solution from Tom in another thread, but it is not working. It still loads the font-awesome from my own site.
This is the code that does not work:
add_action( 'wp_enqueue_scripts', 'generate_custom_scripts', 10 );
function generate_custom_scripts() {
wp_dequeue_style( 'fontawesome' );
wp_enqueue_style( 'fontawesome-cdn', '//maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css', false, '4.3.0', 'all' );
}
Try replacing the "10" in the add_action call to a later number like "99".
Let me know :)
This archived topic is closed to new replies.