I try to load the main stylesheet with enqueue_style - but it isn't working. Here is my code from functions.php:
function my_scripts() {
wp_enqueue_style( 'main-style', get_template_directory_uri() . '/style.css', false, '1.0', 'all' );
}
add_action( 'wp_enqueue_scripts', 'my_scripts' );
Loading the stylesheet in the header.php by using a link-tag works fine. I can't find the error - it seems that code is ignored - but function.php is loading.
I also tried to use get_template_directory_uri()
instead of get_template_directory_uri()
.
Because it is the recommended way to link to styles and scripts I want to get this work. I also want to use enqueue_scripts for some js and jQuery scripts.
Thanks for any hint or advice
The solution: I forgot to call wp_head() in the header.php - added and everything works :-)