add sidebar area to header of child theme

Functions.php is shared for parent/child themes unlike other files which will be overridden. What that means is that WordPress will load both the parent and the child functions.php.

In your case it sounds like you would simply create a child functions.php and then a create new register_sidebar .

Then use dynamic_sidebar whenever you want in your theme template to call your new sidebar.

In my opinion the best method for child themes is to try to avoid duplicate files as much as possible, keep the parent loaded as is, and create your own custom child files. Of course you will have to override some files, but try to keep it modular.

If your theme uses any hard-coded path values and improper function calls for file inclusion then overriding it via the child theme will break stuff, unless you duplicate the structure (except for functions.php).

For reference: http://codex.wordpress.org/Determining_Plugin_and_Content_Directories

For example:
get_stylesheet_directory_uri will use the child
get template directory uri will not

Leave a Comment