• caspersgrin


    I’m starting to learn plugin development using the PACKT book, “WordPress Web Application Development” 2nd edition and the first project is a question/answer interface. I build, installed and successfully activated the plugin built from the example code. The next piece is modifications to the theme. Rather than modifying the actual theme, I decided to try using a child theme following the directions in the codex. On my laptop, I’m running a local copy of a WordPress installation I manage for a Unitarian Universalist congregation. The theme developed for UU Congregations is uua-congregation, so I created a folder called uua-congregation-child in wp-content/themes. I added a styles.css file and literally just copied the header comment from the production version, and that’s all. Then I created a functions.php file just using the wp-enqueue-scripts example from the codex to load parent style sheets. The instructions in the codex at least imply that WordPress will execute the functions.php found in uua-congregation-child rather than the script by the same name in uua-congregation. I brought the local website up with just those changes and everything looked fine. But then I decided to test my assumptions so I went into the child functions.php and made deliberate mistakes. I deliberately changed the function name mh_theme_enqueue_styles() to mhy_theme_enqueue_styles() and changed the name of the parent style sheet and I expected to see errors, either an intentionally WordPress generated error message or at least have garbage presented when I went back again to bring up the website. But, instead everything was fine. It appears to be totally ignoring the child theme. Am I missing something in my understanding? What might be going on?

    [ Signature deleted ]

    • This topic was modified 6 years ago by James Huff. Reason: email address removed from public forum
    • This topic was modified 5 years, 5 months ago by Jan Dembowski.
Viewing 3 replies - 1 through 3 (of 3 total)
  • Moderator Jose Castaneda



    I know it may sound super simple, but is the child theme active?

    I’ve done that more times than I care to admit. 😀



    First off, I suggest going off the WordPress Handbook than The Codex. I think it explains things more clearly than The Codex currently does and is overall a better resources to get accustom to.

    Second, if you copied the style.css header comment exactly from the theme you’re trying to copy then you’re probably missing a crucial Template comment. See the example in The Handbook. The Template comment tells the child theme who the parent theme is by slug so it would look like this in your style.css:

    Theme Name: UUA Congregation Child
    Author: XYZ
    Template: uua-congregation
    Version: 1.0
    Thread Starter caspersgrin


    I wonder why the reference to the template went into style.css header comment. The real problem was that none of the material I read through told me that I needed to activate the child theme template reference is what points WordPress back to the parent. And you’re right, the Handbook makes things much clearer. Live and learn. And thanks!!

    ~ Rob

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Child theme modifications not showing up’ is closed to new replies.