[wp-hackers] Child theme functions.php & processing order

Demetris kikizas at gmail.com
Fri Dec 11 02:36:49 UTC 2009


On Fri, Dec 11, 2009 at 3:32 AM, Doug Stewart <zamoose at gmail.com> wrote:
> Howdy all. I need a gentle shove in the right direction on this one.
>
> When processing a child theme, which ends up getting executed by WordPress
> first, the child or the parent functions.php?  And, parallel to this, if I
> have action or filter hooks registered in the parent, what's the best way to
> ensure that my child theme can override/alter the parent's functions?
>
Answering to the first question:

The child’s functions.php is executed first.

I would expect it to be the other way around.  (But I have no idea if
it matters. For example, when both parent and child register one
function or filter each to the same hook, the order can be adapted
with the priority argument. But probably there are scenarios that I’m
missing.)

Cheers!

Demetris
http://op111.net/


More information about the wp-hackers mailing list