I am trying to include my styles.css stylesheet in a wordpress theme I am trying to develop (my first one). Question: How would one go about including it? I know putting the following code in my header.php file works:
<link rel="stylesheet" href="<?php bloginfo('stylesheet_url'); ?>">
however I would rather like to include it through functions.php like so:
<?php
function firstTheme_style(){
wp_enqueue_style( 'core', 'style.css', false );
}
add_action('wp_enqueue_scripts', 'firstTheme_style');
?>
yet this doew not work at all (When i remove the line from my header.phps 'head', my styles are not seen?
Following method are include
style.css
.Method - 1
Method - 2
Method - 3
The best way to include your styles.css file is to add the following code in your themes functions.php
function themename_enqueue_style() { wp_enqueue_style( 'themename-style', get_stylesheet_uri() ); } add_action( 'wp_enqueue_scripts', 'themename_enqueue_style' );