Cannot get style.css to render on child theme
-
I followed the instructions in the WordPress tutorial of how to make a child theme, namely that you create a style.css file with the appropriate header, and create a functions.php file in which you include:
function theme_enqueue_styles() { $parent_style = 'parent-style'; wp_enqueue_style( $parent_style, get_template_directory_uri() . '/style.css' ); wp_enqueue_style( 'child-style', get_stylesheet_directory_uri() . '/style.css', array( $parent_style ) ); } add_action( 'wp_enqueue_scripts', 'theme_enqueue_styles' );both of which are in my themes directory (I’m running locally on MAMP), but when I try to enable the child theme, there is NO css rendering, it’s completely unstyled. I can’t think of what would be wrong if I directly followed the WordPress tutorial, help please! 🙂
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
The topic ‘Cannot get style.css to render on child theme’ is closed to new replies.