This video could not play here.
It may be members-only, region-restricted, or unavailable in embedded players.
WP_Query and You - Brian Richards
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 Bio: Brian Richards, creator of WPSessions.com, has been using WordPress since 2007 and training and leading development teams since 2011. In addition to investing his time into training, Brian has had the opportunity to work with many amazing WordPress agencies and experts over these last several years. This has allowed Brian to help develop sites for Microsoft, Disney, TIME, YMCA, and numerous others. Brian has an affinity for self-directed learning and helping others to develop skills and workflows to better solve important and complicated problems. He can’t resist helping good people do great things.