WordPress: How can I overwrite php files included in the parent theme?

I have a wp site with the following directory structure.
Directory structure:

themes
 |-parent-theme
 |  |-index.php
 |  |-some-footer.php
 |
 |-parent-theme-child
    |-some-footer.php

The parent-theme directory contains a bunch of php files and index.php is one of them.
The index.php file uses(includes) some-footer.php.

Read More
<?php include('some_footer.php'); ?>

I am trying to overwrite this some-footer.php by create a file with the exact same name, but it is not working.

What should I do to make this work?

Related posts

Leave a Reply

1 comment