Skip to content

Instantly share code, notes, and snippets.

@cdillon
Created December 23, 2016 11:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cdillon/59968ceb8eaa7d45a3f5f8948bbae2ac to your computer and use it in GitHub Desktop.
Save cdillon/59968ceb8eaa7d45a3f5f8948bbae2ac to your computer and use it in GitHub Desktop.
Load a custom style sheet on your site using the Genesis Framework.
<?php
//* Do NOT include the opening php tag
//* Load custom style sheet
add_action( 'wp_enqueue_scripts', 'custom_load_custom_style_sheet' );
function custom_load_custom_style_sheet() {
wp_enqueue_style( 'custom-stylesheet', CHILD_URL . '/custom.css', array(), PARENT_THEME_VERSION );
}
//* Replace default style sheet
add_filter( 'stylesheet_uri', 'custom_replace_default_style_sheet', 10, 2 );
function custom_replace_default_style_sheet() {
return CHILD_URL . '/custom.css';
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment