Add custom stylesheet to a StudioPress child theme (WordPress)

April 16, 2018

When I create a StudioPress child theme, I prefer to have a separate file with custom CSS. 

Add this to the functions.php file: 

add_action( 'wp_enqueue_scripts', 'webwerk_custom_stylesheet' );
function webwerk_custom_stylesheet() {
    wp_enqueue_style( 'custom-style', get_stylesheet_directory_uri() . '/custom.css' );
}

Source: https://gist.github.com/ChrisCree/6389134

Add new comment

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.