I'm starting to build a WordPress theme from scratch. I have MAMP all loaded and running on my computer and WordPress is loaded fine. I have the below three files all in the same folder
C:/MAMP/htdocs/wordpress/wp-content/themes/testtheme
The problem is I can't get the hook in the functions file to actually run the css code in the index file. As far as I can tell, it should. The functions and enqueue's all seem correct. So why wont these files communicate?
index.php
<html>
<head>
</head>
<body>
<h1>Hello World</h1>
<p class="once">This is an attempt at getting the functions file to work with the css files</p>
<p class="twice">Why wont this work...</p>
</body>
style.css
/*
Theme Name: Test Theme
Description: This is a test to see if I can make a theme
Author: Ryan
Author URI: ###
version: 1.0
Template: ABC
*/
h1{
color: red;
}
.once{
text-align: canter;
background-color: gray;
}
.twice{
color: blue;
}
functions.php
<?php
function theme_resources() {
wp_enqueue_style('style', get_stylesheet_uri());
}
add_action('wp_enqueue_scripts', 'theme_resources');
?>