Child Theme not overwriting Parent theme php file
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.
/public_html/wp-content/themes/sahifa/framework/functions/theme-functions.php
/public_html/wp-content/themes/sahifa-child/framework/functions/theme-functions.php
/public_html/wp-content/themes/sahifa/framework/parts/related-posts.php
/public_html/wp-content/themes/sahifa-child/framework/parts/related-posts.php
- Other question I had was do I need all the files in each folder to copied over?
- 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:
https://drive.google.com/file/d/1xDx62NxDIj3HlEkh3_txZa4mywW-2SlP/view?usp=sharing
https://drive.google.com/file/d/127oDdNQWxritIVXcvbHURANg5b4tpJCL/view?usp=sharing
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');
Topic child-theme post-thumbnails child-pages Wordpress
Category Web