Bug in Child Theme Guide
Feel free to talk about everything related to our Wordpress Products
Rate this topic:
- 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:
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:
Happy coding!
James
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
-
- 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.
You're right, thank you for your feedback, it should be fixed now.
-
- 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
Just went to use the article again for another site, which reminded me of this - it is indeed fixed now.
Thanks
James
-
- Fresh Boarder
3 posts
• Page 1 of 1