Skip to content

Instantly share code, notes, and snippets.

@ZellSnippets
Created September 14, 2013 15:06
Show Gist options
  • Save ZellSnippets/6562754 to your computer and use it in GitHub Desktop.
Save ZellSnippets/6562754 to your computer and use it in GitHub Desktop.
PHP: WP: Enqueue Styles
// 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