Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 14 days ago.
Improve this questionOn the homepage of a WordPress website the latest posts are visible. In the dashboard it's set to display 10 posts on the home page.
However, it loads 133 posts. Switching to the default theme didn't make any difference.
The version of WordPress is updated.
Where should we start debugging the problem?
Closed. This question is opinion-based. It is not currently accepting answers.Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 14 days ago.
Improve this questionOn the homepage of a WordPress website the latest posts are visible. In the dashboard it's set to display 10 posts on the home page.
However, it loads 133 posts. Switching to the default theme didn't make any difference.
The version of WordPress is updated.
Where should we start debugging the problem?
The theme is most likely altering the main query via the pre_get_posts
hook, chaning the posts_per_page
argument to -1 for all posts, or another higher number.
You can search your theme folder for pre_get_posts
to see all the times this hook is used.
A better solution would be to install the Query Monitor. With this plugin installed and active, you get a wealth of information about each page request.
To use it, login as admin and visit your homepage once the plugin is active. The admin bar will have a new options. Click the new option (looks like a bunch of numbers) and choose the "Hooks & Actions" section. From there, select "Pre" from the "Hook" dropdown and it will list all where the pre_get_posts
hooks is being called.