I am calling my stylesheet styles.css
within functions.php
. Also adding add_action
. But it does not work…
<?php
function myBlog_files() {
wp_enqueue_style('styles', get_stylesheet_uri());
}
add_action('wp_enqueue_scripts', 'myBlog_files');
?>
styles.css
is on the same level as functions.php
in directory.
Do I need to call the function within index.php
or elsewhere?
Thanks
get_stylesheet_uri
it must bestyle.css
, astyle.css
is a mandatory file in a WP theme anyway. If you want to enqueue a file other thanstyle.css
you need to specify it, WP isn't psychic and needs to be told explicitly