If your Parent Theme, has a template file loop-author.php
, copy it to your Child Theme; otherwise, copy your Parent Theme’s loop.php
template file to your Child Theme, and rename it as loop-author.php
.
Now, modify your Child Theme’s loop-author.php
template file, in whatever way you wish.
You don’t need to make any other changes, either to the Parent Theme or to your Child Theme. The Parent Theme already accounts for a Child Theme’s use of loop-author.php
, based on its call to get_template_part( 'loop', 'author' );
.
The way such a call works is this: WordPress will look for files in the following order, until it finds one that exists:
- Child Theme
loop-author.php
- Parent Theme
loop-author.php
- Child Theme
loop.php
- Parent Theme
loop.php
Thus, you see the power and flexibility of get_template_part()
!