If the php file is gets include
d or require
d from functions.php file in parent theme all codes are added to runtime they are not replaced if you create files in similar directory structure.
So, What can be replaced?
-
Only files called via
get_template_part()
can be replaced this way. This is also true for any file in template hierarchy -
If the parent theme uses
add_action()
oradd_filter()
with function name you can remove them usingremove_action()
orremove_filter()
and use your own replacements. -
If parent theme uses
function_exists()
orclass_exists()
with an if encapsulating a function/class they can be replaced from your child themesfunctions.php
file.