Different Results with query(‘s=computer’) vs get_posts(‘s=computer’)?
The default arguments for get_posts() function include ‘numberposts’ => 5. So if you’re querying for a search term that returns more than five (5) results the second query will return a maximum value of 5 unless you pass ‘s=computer&numberposts=-1′ as your query string. The WP_Query object doesn’t have a ‘numberposts’ default, although it is affected … Read more