I have no idea how this was ever working for you to begin with, but there’s really no need to use a custom page template for the blog posts index template. WordPress provides a template file to use: home.php
. Easiest solution:
- Rename
homepage.php
ashome.php
and remove any custom template header comments - Remove all
query_posts()
references insidehome.php
- Ensure that Posts Page settings are correct in Settings -> Reading
- Keep
pre_get_posts
filter in place
This will revert WordPress to using the reserved template, home.php
, to render the blog posts index, while allowing WordPress to recognize the query as being the blog posts index.