Note that a function in a child theme’s functions.php can only override a function in the parental functions.php, if the parent’s function is enclosed in a function_exists
statement. Overriding does not happen automatically. Demetris 12:27, 13 April 2010 (UTC)
I believe it is not possible to enhance the Child Themes article to the point that it offers all the detailed examples and the detailed information found in well-written tutorials on the internet. For this reason, I have been meaning to add a couple more external links, not remove the couple that I started with. I have not done so yet, because I want to make a careful selection. I know that I am in a sensitive position here, since I am the author of one the linked articles, but then, what am I to do? Not link to something good because I wrote it? Or banish external links completely from the article? Don’t know... Still working on the text, anyway, trying to improve it and make it more comprehensive, regardless of what links/resources it offers. Demetris 15:12, 16 April 2010 (UTC)
The only required file is style.css. User "Negatif" changed that to include index.php, which is not required.
Now that there's [easy] support for TinyMCE styles in the theme, it seems info about this should get added to the Codex. I just observed that in Twenty-Eleven, putting an editor-style.css file in the Child Theme folder is additive (that is, editor-style.css in both the parent and child themes are used without an @import statement in the child theme). I don't know enough to write the section, but it seems like someone who does could make really valuable contribution to this page by adding info on editor-style.css. It seems to clearly be an exception.
I've spotted a problem in code examples that can lead to confusion: - twintyten and twentyeleven uses id selectors whereas twentytwelve uses class.
#site-title vs .site-title
In the first example of creating theme header for the child theme, currently it is showing twenty-fourteen in template. The default theme shipped with WordPress currently is in twentyfourteen directory. If a beginner level user copies the example stylesheet code as it is, their child theme will not be able to find the parent theme's directory or its stylesheet. Even though this is just a sample code and technically correct. But if we are using twentyfourteen as referrence, I think we should use it correctly.
Hi all. The formatting of this entry is a bit... strange. Are there any objections if I move all of the CSS related info to the top of the article (under the 'How to Create a child Theme' header)? Right now there's information on the stylesheet header, followed by information on how to enqueue the parent theme stylesheet, but then (prior to my edit), instructions on enqueuing the child theme stylesheet were somewhere near the bottom. Imo, this makes the entry unintuitive and confusing for the uninitiated (no offence intended to the present authors). Some of the phrasing / word choice could also be improved for flow / clarity. Thanks! JPaavola (talk) 15:21, 17 December 2014 (UTC)
where does the require once go? in functions.php?
require_once( get_stylesheet_directory() . '/my_included_file.php' );
TY. (=
The instructions for creating a child from an already modified parent theme seem to reference use of a plugin. The plugin 'Child Theme Configurator' possibly. In any case, the instructions starting at step 2 don't give information about navigating to that functionality. Cindio (talk) 18:14, 20 September 2016 (UTC)
I have removed the "The only required child theme file is style.css…" line, since a functions.php file is now required to enqueue parent stylesheets properly.