Skip to content

Instantly share code, notes, and snippets.

@gheghici
Forked from ChrisCree/functions.php
Created September 5, 2018 11:11
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 gheghici/8f06b24fc3d1ed8a0b56c8417c4c1e94 to your computer and use it in GitHub Desktop.
Save gheghici/8f06b24fc3d1ed8a0b56c8417c4c1e94 to your computer and use it in GitHub Desktop.
Adding a custom.css stylesheet to your Genesis child theme (will work for non Genesis themes as well). First create a custom.css file with your custom styles and FTP it up to your child theme directory. Then add the below code to your child theme's functions.php file.
<?php
// Do not copy opening php tag above
add_action( 'wp_enqueue_scripts', 'wsm_custom_stylesheet', 20 );
function wsm_custom_stylesheet() {
wp_enqueue_style( 'custom-style', get_stylesheet_directory_uri() . '/custom.css' );
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment