I would like to change the title of author archive pages to display as something like ‘Posts by (author name)’ instead of just ‘(author name)’.
This is controlled by the generate_archive_title function, but if I change something there then it will add the ‘Posts by’ to all archive page titles.
So, basically I want to change
<h1 class="page-title">
<?php the_archive_title(); ?>
</h1>
to
<h1 class="page-title">
Posts by <?php the_archive_title(); ?>
</h1>
on author archive pages only.
What is the best way to do that?