Do all files in child theme override the parent?

It depends entirely on a) what functions and template files you’re talking about, and b) how those functions are defined, or template files are called, in the Parent Theme.

If the Parent Theme uses get_template_part(), then you’re golden. If the Parent Theme uses get_stylesheet_directory_uri() or STYLESHEETPATH, then you can override, with caveats. If the Parent Theme uses get_template_directory_uri() or TEMPLATEPATH, then you’re going to have a difficult time.

With functions, if the Parent Theme wraps the functions in a function_exists() conditional, then you can simply override such functions by declaring them in the Child Theme. With hooks, you can simply remove_action or remove_filter.

Leave a Comment