0

I noticed that creating twentythirteen-child/archive.php overwrites twentythirteen/archive.php but creating twentythirteen-child/shortcodes/drop-cap/drop-cap.php does not overwrite twentythirteen/shortcodes/drop-cap/drop-cap.php.

What does this depend on? Sub-folders aren't overwritten?

Similarly twentythirteen-child/shortcodes/drop-cap/drop-cap.css will not overwrite parent CSS file if called through wp_enqueue_script();. This means that wp_dequeue_script() and wp_deregister_script() must always exist for multiple CSS and JS files (and for PHP files in folders)?

0

The files included via the get_template_part function are replaceable. That can be a lot of files or only a few, depending on the theme. I think this answers most of your question.

The functions.php of a child theme is included in addition to the parent functions.php.

The style.css of the child replaces the parent. Other stylesheets should be enqueued and can be removed via the mechanisms of that subsystem.

I have probably forgotten or missed something but that is the quick version.

Additional information is in the Codex: http://codex.wordpress.org/Child_Themes

  • Yes, the first sentence answers everything :) I'll test this now and I think that get_template_part is the solution to everything that I was missing (i.e. replacing PHP files in sub-folders with ability to replace CSS and JS and not only PHP). I've read the article from Codex about Child Themes a few times but it doesn't mention how far a theme can go if it comes to modules (separate JS/CSS per module). – Paul Jun 6 '13 at 14:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.