I have created a child theme for my parent theme. Just added style.css
and functions.php
files in child theme.
Original Theme Name: Verb Lite (Directory name verb-lite)
I created new folder verb-lite-child
in themes folder, added the following files.
style.css
file
/*
Theme Name: Verb Lite Child Theme
Description: A child theme of the Verb Lite theme
Template: verb-lite
Version: 1.0.0
*/
functions.php
file to enqueue parent styles,
<?php
add_action( 'wp_enqueue_scripts', 'theme_enqueue_styles' );
function theme_enqueue_styles() {
wp_enqueue_style( 'parent-style', get_template_directory_uri() .
'/style.css' );
}
?>
Now when I preview my theme, the styles are broken, the parent styles are not loaded.
Is there anything I missed there.
style.css
might have problem in its header. Try removing theTheme
word from the name, and also try to include the full header as shown here.