• When I google I find some people saying that posts_per_page limits the query and only returns the number of posts specified in the parameter. However, others claim it is not so. Common sense to me suggests it does not limit the query but rather “segments” the query and puts one segment on each page.

    Which is it?

    My scenario:
    I want to pull only five posts from a large database and display them on my front page. I want WPQuery to stop after it finds five posts according to my criteria and not waste resources continuing going through the entire database. Does posts_per_page help me do this?

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Does posts_per_page limit/abandon the query?’ is closed to new replies.