Creating a Child Theme
-
I need to create a Child theme but I seem to be having problems with the functions.php. Each time it brings up an error supposedly caused by the hyphen in the theme name. Am I doing something wrong? Is there a way around it?
<?php // Add your custom functions here // Queue parent style followed by child/customized style add_action( 'wp_enqueue_scripts', 'zoom-lite_enqueue_child_styles', 99); function zoom-lite_enqueue_child_styles() { wp_enqueue_style( 'parent-style', get_template_directory_uri() . '/style.css' ); wp_dequeue_style('zoom-lite-style'); wp_enqueue_style( 'child-style', get_stylesheet_directory_uri() . '/style.css', array('parent-style') ); } ?>
My apologies if I’ve got this wrong. I’m very new to child themes.
Viewing 6 replies - 1 through 6 (of 6 total)
Viewing 6 replies - 1 through 6 (of 6 total)
- The topic ‘Creating a Child Theme’ is closed to new replies.