Ian Dunn

Ian Dunn

WordPress Developer

Menu

Skip to content
  • Home
  • About
  • Archives
  • Contact

Tag Archives: WP_Query

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.

Posted on October 8, 2011 by Ian Dunn. Posted in WordPress | Tagged get_posts(), query_posts(), WP_Query | Leave a comment

Subscribe via Email

Feeds & Profiles

  • RSS
  • WordPress.org
  • GitHub
  • HackerOne
  • LinkedIn