Last active
May 26, 2017 22:28
-
-
Save jpmarchand/f865f0b5b5fd407b48ec to your computer and use it in GitHub Desktop.
Load Font Awesome using MaxCDN. Source: http://www.bootstrapcdn.com/fontawesome/
This file contains 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 | |
//* Load Font Awesome using MaxCDN conditionally | |
add_action('wp_enqueue_scripts', 'customprefix_enqueue_font_awesome'); | |
function customprefix_enqueue_font_awesome() { | |
if (is_category() || is_home()) { | |
wp_enqueue_style('font-awesome', '//maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css'); | |
} | |
} |
This file contains 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 | |
//* Load Font Awesome using MaxCDN | |
add_action('wp_enqueue_scripts', 'customprefix_enqueue_font_awesome'); | |
function customprefix_enqueue_font_awesome() { | |
wp_enqueue_style('font-awesome', '//maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css'); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment