• Hi,

    I have a question about the child theme functions.php:

    At this page it says under “Template Files”, “If you want to change more than just the stylesheet, your child theme can override any file in the parent theme: simply include a file of the same name in the child theme directory, and it will override the equivalent file in the parent theme directory when your site loads.” And under “Using functions.php” it says “Unlike style.css, the functions.php of a child theme does not override its counterpart from the parent. Instead, it is loaded in addition to the parent’s functions.php. (Specifically, it is loaded right before the parent’s file.)”

    So, first it says that it OVERRIDES any file and then it says it does NOT OVERRIDE the file. And when it is loaded right BEFORE the parent’s file then the end result would be the one from the PARENT file and NOT the one from the CHILD file, right?

    I`m confused, please help.

    Thanks a lot in advance for your help.

    Best regards

    Albert

Viewing 2 replies - 1 through 2 (of 2 total)
  • the end result would be the one from the PARENT file and NOT the one from the CHILD file, right?

    No. If the parent theme is child friendly, then it will check to see o in the parent. So child always trumps parent.

    Thread Starter albert0346

    (@albert0346)

    Thanks esmi!

    Oh my God, I’m really, really confused! I mixed up in my previous post placing files in the child theme directory and using a child theme functions.php.

    Sorry for this ?? !

    Albert

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Child theme functions.php question’ is closed to new replies.