How to limit WP_Query to grab only let’s say 5 results? What I mean is actually only 5 results rather than 5 posts per page.
This
How to limit the number of posts that WP_Query gets?
provides some insight and advices to use no_found_rows=true
but do you use it with posts_per_page or do you need to limit results somewhere else?
In my case (search) get_posts
doesn’t work as I need to provide a search query.