Skip to content

Instantly share code, notes, and snippets.

@robneu
Last active November 29, 2022 10:47
Show Gist options
  • Star 4 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save robneu/5668334 to your computer and use it in GitHub Desktop.
Save robneu/5668334 to your computer and use it in GitHub Desktop.
Add Font Awesome to WordPress using a CDN
<?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' );
}
@robneu
Copy link
Author

robneu commented May 29, 2013

We're using this on the FAT Media website now. Working great! :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment