Child Theme’s Read More Text

As this line of code is hardcoded in the index.php file rather than called via a function you only really have two options:

  • Write your own function to call this code (with your chosen read more text), then replace the relevant section in the child theme’s index.php file with a call to this function. The function would go in your child theme’s functions.php file.
  • Create a copy of the index.php file in your child theme, then change the hardcoded read more text to what you want it to be.

Obviously neither of these solutions solve the original problem (not wanting to copy over the index.php file).

It’s also worth taking note of the comment at the top of the index.php file:

This is the default template. It is used when a more specific template can’t be found to display posts. It is unlikely that this template will ever be used, but there may be rare cases.

Therefore for this change to take effect on all relevant pages you’ll also want to edit page-template-front.php, archives.php, page-template-archives.php and search.php (I think that’s all of them).

A more hacky approach would be to write a ‘find and replace’-style function that looks for the current read more text and replaces it with something else, then call this function from your child theme’s footer.php file.

In short, I don’t think there’s a way to switch out this text without copying at least one include or page template into your child theme.