FAQ
overflow

Great Answers to
Questions About Everything

QUESTION

What are the differences between using WP_Query() and get_posts()? Which is better to use in what case and why?

{ asked by Amit }

ANSWER

Well, get_posts() actually instantiates a new WP_Query object, so if you're comfortable using WP_Query directly, don't even bother with get_posts(); get_posts will only return the results from the database, whereas WP_Query gives you the whole functionality of the class.

{ answered by John P Bloch }
Tweet