I just created a child theme and activated it.But when I visit the page,it's completely blank.
In the display is the themes folder where I have my parent theme and the child,then below is the site details from the parent style.css which I simply copied and pasted to the child stylesheet.
functions.php looks like this:
<?php
function my_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 ),
wp_get_theme()->get('Version')
);
}
add_action( 'wp_enqueue_scripts', 'my_theme_enqueue_styles' );
?>
As the photo shows,the theme is active.
How can I create a child theme and make it visible as the parent theme?
WP_DEBUG
true
? – Andy Tschiersch