Child themes logic flaw or at least I think so

Featured Image

If you are not familiar with child themes concept read the following first:

What I like about this concept most is the fact that I can make presentation changes without modifying any files of the parent's theme. CSS changes - peanuts. Template changes - piece of cake. Unfortunately there is one serious flaw in parent-child themes logic. It's the way functions.php is handled. If your child theme has functions.php it will be executed first then parent's. In my humble opinion functions.php of the child theme (if exists) should replace parent's functions.php entirely! For example try to get rid of one of sidebars registered by parent. You cannot deregister it in a child's functions.php because the sidebar is not yet registered! This is just one example. You probably see already many cases that you'll HAVE TO modify parent theme. This could be avoided if function.php was treated in exactly the same way as templates - child's one replaces parent's one.

Leave a Reply

Links are not allowed in comment field!

Your email address will not be published.