Bug in Child Theme Guide

Feel free to talk about everything related to our Wordpress Products
Rate this topic: Evaluations: 0, 0.00 on the average.Evaluations: 0, 0.00 on the average.Evaluations: 0, 0.00 on the average.Evaluations: 0, 0.00 on the average.Evaluations: 0, 0.00 on the average.Evaluations: 0, 0.00 on the average.
GK User
Mon May 18, 2015 1:58 pm
Hi,

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
User avatar
Fresh Boarder

GK User
Mon May 18, 2015 9:23 pm
Hello,

You're right, thank you for your feedback, it should be fixed now.
User avatar
Moderator

GK User
Wed Jun 03, 2015 2:18 pm
Hi Piotr,

Just went to use the article again for another site, which reminded me of this - it is indeed fixed now.

Thanks

James
User avatar
Fresh Boarder


cron
Remember me
Register New Account
If you are old Gavick user, click HERE for steps to retrieve your account.