Why isn't my child theme using the new style.css file?
I followed a very simple tutorial on how to queue a child theme, but when I actually went to edit my style. Have I used this code incorrectly?
style.css
/*
Theme Name: Blank Slate Child
Theme URI: http://www.efficientmind.org/blankslate-child/
*/
Start code in functions.php function
<?php
add_action( 'wp_enqueue_scripts', 'theme_enqueue_styles' );
function theme_enqueue_styles() {
wp_enqueue_style( 'parent-style', get_template_directory_uri() . '/style.css' );
}
?>
+3
source to share
2 answers
The header of your stylesheet for your theme must contain the template string (name of the parent theme) in order to work.
Example:
/*
Theme Name: Twenty Thirteen Child
Theme URI: http://example.com/
Description: Child theme for the Twenty Thirteen theme
Author: Your name here
Author URI: http://example.com/about/
Template: twentythirteen
Version: 0.1.0
*/
+2
source to share