why I can never create a child theme?
-
I’m trying to create a child theme without using the old @import but it never works, I’ve tried with several themes from several developers and the only way I can create the child theme is by giving up and using @import..
I’ve tried adding to function.php this code:
add_action( ‘wp_enqueue_scripts’, ‘theme_enqueue_styles’ );
function theme_enqueue_styles() {
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’)
);
}and also this code:
add_action( ‘wp_enqueue_scripts’, ‘theme_enqueue_styles’ );
function theme_enqueue_styles() {
wp_enqueue_style( ‘parent-style’, get_template_directory_uri() . ‘/style.css’ );
}and when I try to activate it, I get The parent theme is missing. Please install the “Felicity” parent theme. message even thou the theme Felicity (or whatever themes I’ve tried) are all installed and the spell is correct..
Am I missing something? Is there something in the function I’m supposed to add?
Thanks
- The topic ‘why I can never create a child theme?’ is closed to new replies.