Does posts_per_page limit/abandon the query?
-
When I google I find some people saying that
posts_per_pagelimits 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. Doesposts_per_pagehelp me do this?
The topic ‘Does posts_per_page limit/abandon the query?’ is closed to new replies.