Archived topic
Inherit query from template (Query loop)
3 replies · Started by Anders on November 8, 2022
Working with the latest version of query loop for my homepage and category pages. Everything is fine appart from the fact that when i chose "Inherit query from template" I can't find a way to adjust numer of outputs.
Searching here indicates that "reads" defines this but it doesn't say me anything I'm afraid.
Could you help me so that I can use my template for homepage and category page and modify the output please.
Everything is fine appart from the fact that when i chose “Inherit query from template” I can’t find a way to adjust numer of outputs.
Inherit query from template means the query loop will inherit the default loop of the archive/blog, it includes how many posts to show per page, if you want to change the post number, you will need custom function to change the post number of the archive/blog page itself.
Thanks, do you have any link or info on how to change the post number, i.e. the inherited number, in the archive pages?
Check out this WP filter:
https://developer.wordpress.org/reference/hooks/pre_get_posts/