If you’re building WordPress themes or plugins, WP_Query is certainly something you’ve needed to use whether you realize it or not. In addition to providing a very clean and simple means for generating complex MySQL queries, WP_Query also does a number of different things behind the scenes that help us access our data effortlessly and efficiently. However, these same features that make WP_Query easy and powerful can also cause us much grief without us even realizing it.
Whether you’re just getting started with WordPress development or you’ve been writing queries pretty steadily for several years now, there’s bound to be a nugget (or several) of information in this presentation that will surprise and even help you.
WP_Query
, get_posts()
, and query_posts()
WP_Query
is calledWP_Query
provides