Differences between query_posts(), get_posts() and WP_Query

This WordPress Answers page explains the differences between the query_post() and get_posts() functions, and their relation to the WP_Query class. They both use WP_Query internally, but should be used in different contexts. Using them in the wrong context could lead to bugs that are hard to track down.

Leave a Reply

Your email address will not be published. Required fields are marked *