Last active
November 29, 2022 10:47
-
-
Save robneu/5668334 to your computer and use it in GitHub Desktop.
Add Font Awesome to WordPress using a CDN
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_action( 'wp_enqueue_scripts', 'prefix_enqueue_awesome' ); | |
/** | |
* Register and load font awesome CSS files using a CDN. | |
* | |
* @link http://www.bootstrapcdn.com/#fontawesome | |
* @author FAT Media | |
*/ | |
function prefix_enqueue_awesome() { | |
wp_enqueue_style( 'prefix-font-awesome', '//netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.min.css', array(), '4.0.3' ); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
We're using this on the FAT Media website now. Working great! :)