How to add custom css file in theme?

How to add custom css file in theme?

  • By admin
  • wordpress
  • Comments Off on How to add custom css file in theme?

How to add custom css file in theme?

Add the CSS File to Your Theme:
Then pase below code in functions.php
function enqueue_custom1_styles() {
wp_enqueue_style(‘custom-new-style’, get_template_directory_uri() . ‘/custom-newstyle.css’, array(), ‘1.0’, ‘all’);
}
add_action(‘wp_enqueue_scripts’, ‘enqueue_custom1_styles’);

Paste code in function
wp_enqueue_style (‘theme-style’, get_template_directory_uri().’/css/style.css’);
Other way

add_action( 'wp_enqueue_scripts', 'child_enqueue_styles');

function child_enqueue_styles() {

wp_enqueue_style( 'reset-style', get_template_directory_uri() . '/css/latest-blog.css', array());
}

 

Manifest Desires-Click Here