Created
September 14, 2013 15:06
-
-
Save ZellSnippets/6562754 to your computer and use it in GitHub Desktop.
PHP: WP: Enqueue Styles
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
// Enqueue stylesheets | |
remove_action( 'genesis_meta', 'genesis_load_stylesheet' ); | |
add_action( 'wp_enqueue_scripts', 'zell_load_stylesheets' ); | |
function zell_load_stylesheets() { | |
if( !is_admin() ) { | |
// Main theme stylesheet | |
wp_enqueue_style( 'zell', get_stylesheet_directory_uri() . '/css/style.css', array(), null ); | |
// Google Fonts | |
wp_enqueue_style( | |
'google-fonts', | |
'//fonts.googleapis.com/css?family=Open+Sans:300,400,700,800', // Open Sans (light, normal, and bold), for example | |
array(), | |
null | |
); | |
// Highlight js Styles | |
wp_enqueue_style( 'tomorrow-night', get_stylesheet_directory_uri() . '/js/vendor/highlight.js/styles/tomorrow-night.css', array(), null ); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment