I have created a child theme from the Casper WP theme. It is called casper-child, the Casper parent theme is in a folder called "casper-master". Here is my child style.css file that is being read correctly (the background color does change to pink).
/*
Theme Name: Casper Child
Description: Child theme for Casper theme
Author: Grant
Template: casper-master
*/
body { background-color: pink; }
My problem is that my functions.php file is not being read/working.
My functions.php for my child theme is located here: /wp-content/themes/casper-child/functions.php
The parents functions.php file is at /wp-content/themes/casper-master/functions.php
The code I have in my child's functions.php is:
<?php
add_action( 'wp_enqueue_scripts', 'my_child_theme_scripts' );
function my_child_theme_scripts() {
wp_enqueue_style( 'parent-theme-css', get_template_directory_uri() . '/style.css' );
}
The parent theme is still not being loaded. Any ideas why? I can't seem to get anything to work in the functions.php file, no custom functions with redirects or anything. It feels like the file is not being read.