WP_Query & You

If you’re building WordPress themes or plugins, WP_Query is certainly something you’ve needed to use whether you realize it or not. WP_Query is the backbone of WordPress. It is front and center of everything that happens on any typical WordPress site. In fact, WP_Query is a deceptively simple tool that packs a very powerful punch.

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 ever 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.

In this presentation we’ll look at all of the following:

  • Common uses (or misuses) for WP_Query, get_posts(), and query_posts()
  • The many, many query parameters that are available to us
  • Some of the more advanced ways we can query based on date, meta, or taxonomy data
  • What actually happens each time WP_Query is called
  • An abbreviated look at the many steps WP takes in serving a given page request
  • The many ways a query can be modified and refined via several different hooks
  • Finally, we’ll discuss the risky pitfalls and practical performance wins WP_Query provides If time allows, we might even talk briefly about the pros and cons of using $wpdb instead of WP_Query.

Speaker

WordCamp Orlando 2017 is over. Check out the next edition!