Just thought I'd let you know, in your guide to setting up a child theme the block of code below (showing the alternative to using @import for CSS) has a minor bug in it:
- Code: Select all
<?php
add_action('wp_enqueue_scripts', 'child_theme_css’);
function child_theme_css() {
wp_enqueue_style('parent-theme-css', get_template_directory_uri() . '/style.css');
}
The closing apostrophe in the function name 'child_theme_css’ is different to the rest, which can cause some problems with encoding etc - I only noticed this because my code coloring in Dreamweaver picked it up but it could cause extensive stress to people who don't know about this being a potential issue.
EDIT: For completeness here, this should be the code:
- Code: Select all
<?php
add_action('wp_enqueue_scripts', 'child_theme_css');
function child_theme_css() {
wp_enqueue_style('parent-theme-css', get_template_directory_uri() . '/style.css');
}
Happy coding!
James