Error when previewing child theme
-
I got this error when previewing a child theme I created. The error message is:
Fatal error: Call to undefined function get_current_screen() in ~/wp-admin/includes/dashboard.php on line 23I created the child directory in ~/wp-content/themes/coraline-child with the following files:
1. functions.php
<?php
add_action( ‘wp_enqueue_scripts’, ‘my_theme_enqueue_styles’ );
function my_theme_enqueue_styles()
{
wp_enqueue_style( ‘parent-style’, get_template_directory_uri() . ‘/style.css’ );
}2. style.css
/*
Theme Name: Coraline Child
Description: Coraline Child Theme
Template: coraline
Version: 1.0.0
Text Domain: coraline-child
*/
?>Any idea what could have gone wrong?
Thanks,
Bee
- The topic ‘Error when previewing child theme’ is closed to new replies.