functions – wp_head not injecting css
Question
I’m trying to inject a style.css script into my front-page.php. None of the styles load. In the tutorials, when you inspect page source, all the CSS should be there, but it simply shows the wp_head() script without injecting anything. Any advice is greatly appreciated!
front-page.php
<head>
<php?
wp_head();
?>
</head>
functions.php
<?php
function load_scripts(){
echo "Hello Functions!";
wp_enqueue_style('any-style-name', get_stylesheet_directory_uri() . '/style.css');
}
add_action( 'wp_enqueue_scripts', 'load_scripts');
?>
folder structure
Other scripts I have tried using in “load_scripts”
wp_enqueue_style('any-style-name', get_stylesheet_uri());
wp_enqueue_style('anydescription', get_stylesheet_uri(), array(), "1.0", 'all');
wp_enqueue_style("anydescription", get_template_directory_uri() . "/style.css", array(), "1.0", "all");
0
1 month
2022-12-18T12:08:16-05:00
2022-12-18T12:08:16-05:00 0 Answers
0 views
0
Leave an answer