I'm new to Wordpress and how Child themes work. My child theme I am trying to overwrite two files in sub-directories. I've copied the parent files and edited them in child theme but changes are not reflected in parent theme. I'm trying to change the code for feature image sizes. I successfully changed the code in parent to test it and it works. But child theme isn't overriding it.

  1. Other question I had was do I need all the files in each folder to copied over?
  2. Or Can I have the folder and just the one file I'm editing inside?

Update: I have no clue how to add the code by some suggestion made. I'd Appreciate if I could be shown. Here's a link to the files on my Google Drive:



Update: I see in the parent theme this line of code in the functions.php file:

// Main Functions
require_once ( get_template_directory() . '/framework/functions/theme-functions.php');

1 Answer 1


If the php file is gets included or required 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?

  1. Only files called via get_template_part() can be replaced this way. This is also true for any file in template hierarchy

  2. If the parent theme uses add_action() or add_filter() with function name you can remove them using remove_action() or remove_filter() and use your own replacements.

  3. If parent theme uses function_exists() or class_exists() with an if encapsulating a function/class they can be replaced from your child themes functions.php file.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.