Sonya Lynn Designs

Blogging McBloggerson

  • About Me
  • My Blog
    • WordPress How To
    • WordPress Plugins
    • WordPress Themes
You are here: Home / Wordpress / Wordpress How To / How to Add Custom.css to Wordpress Child Theme

How to Add Custom.css to WordPress Child Theme

July 24, 2016 by Sonya Lynn Designs Leave a Comment

Create custom.css file in your child theme and paste in this code with the correct information, and add your custom css code below.

[code]
/*
Theme Name:
Description:
Author:
Author URI:
Version:
Template:
Template Version:
*/
[/code]

Next, add the following snippet of code to the child theme’s functions.php file.

[code]
// CUSTOM CSS FILES
function custom_style_sheet() {
wp_enqueue_style( 'custom-styling', get_stylesheet_directory_uri() . '/custom.css' );
}
add_action('wp_enqueue_scripts', 'custom_style_sheet');
[/code]

Voila!

Related

Filed Under: Wordpress How To

Leave a Reply Cancel reply