{"id":1254,"date":"2017-10-02T19:34:22","date_gmt":"2017-10-02T19:34:22","guid":{"rendered":"https:\/\/2017.orlando.wordcamp.org\/?post_type=wcb_session&#038;p=1254"},"modified":"2017-10-02T19:34:22","modified_gmt":"2017-10-02T19:34:22","slug":"wp_query-you","status":"publish","type":"wcb_session","link":"https:\/\/orlando.wordcamp.org\/2017\/session\/wp_query-you\/","title":{"rendered":"WP_Query &amp; You"},"content":{"rendered":"<p>If you&#8217;re building WordPress themes or plugins, WP_Query is certainly something you&#8217;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.<\/p>\n<p>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.<\/p>\n<p>Whether you&#8217;re just getting started with WordPress development or you&#8217;ve been writing queries pretty steadily for several years now, there&#8217;s bound to be a nugget (or several) of information in this presentation that will surprise and even help you.<\/p>\n<p>In this presentation we&#8217;ll look at all of the following:<\/p>\n<ul>\n<li>Common uses (or misuses) for WP_Query, get_posts(), and query_posts()<\/li>\n<li>The many, many query parameters that are available to us<\/li>\n<li>Some of the more advanced ways we can query based on date, meta, or taxonomy data<\/li>\n<li>What actually happens each time WP_Query is called<\/li>\n<li>An abbreviated look at the many steps WP takes in serving a given page request<\/li>\n<li>The many ways a query can be modified and refined via several different hooks<\/li>\n<li>Finally, we&#8217;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.<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>If you&#8217;re building WordPress themes or plugins, WP_Query is certainly something you&#8217;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. &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/orlando.wordcamp.org\/2017\/session\/wp_query-you\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;WP_Query &amp; You&#8221;<\/span><\/a><\/p>\n","protected":false},"author":8798362,"featured_media":0,"template":"","meta":{"jetpack_post_was_ever_published":false,"_wcpt_session_time":1510498800,"_wcpt_session_duration":3000,"_wcpt_session_type":"session","_wcpt_session_slides":"","_wcpt_session_video":"","_wcpt_speaker_id":[901],"footnotes":""},"session_track":[144],"session_category":[],"class_list":["post-1254","wcb_session","type-wcb_session","status-publish","hentry","wcb_track-development"],"jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p8CCtn-ke","session_date_time":{"date":"November 12, 2017","time":"3:00 pm"},"session_speakers":[{"id":"901","slug":"brian-richards","name":"Brian Richards","link":"https:\/\/orlando.wordcamp.org\/2017\/speaker\/brian-richards\/"}],"session_cats_rendered":null,"_links":{"self":[{"href":"https:\/\/orlando.wordcamp.org\/2017\/wp-json\/wp\/v2\/sessions\/1254","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/orlando.wordcamp.org\/2017\/wp-json\/wp\/v2\/sessions"}],"about":[{"href":"https:\/\/orlando.wordcamp.org\/2017\/wp-json\/wp\/v2\/types\/wcb_session"}],"author":[{"embeddable":true,"href":"https:\/\/orlando.wordcamp.org\/2017\/wp-json\/wp\/v2\/users\/8798362"}],"version-history":[{"count":1,"href":"https:\/\/orlando.wordcamp.org\/2017\/wp-json\/wp\/v2\/sessions\/1254\/revisions"}],"predecessor-version":[{"id":1255,"href":"https:\/\/orlando.wordcamp.org\/2017\/wp-json\/wp\/v2\/sessions\/1254\/revisions\/1255"}],"speakers":[{"embeddable":true,"href":"https:\/\/orlando.wordcamp.org\/2017\/wp-json\/wp\/v2\/speakers\/901"}],"wp:attachment":[{"href":"https:\/\/orlando.wordcamp.org\/2017\/wp-json\/wp\/v2\/media?parent=1254"}],"wp:term":[{"taxonomy":"wcb_track","embeddable":true,"href":"https:\/\/orlando.wordcamp.org\/2017\/wp-json\/wp\/v2\/session_track?post=1254"},{"taxonomy":"wcb_session_category","embeddable":true,"href":"https:\/\/orlando.wordcamp.org\/2017\/wp-json\/wp\/v2\/session_category?post=1254"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}