{"id":450601,"date":"2014-03-31T21:12:25","date_gmt":"2014-04-01T02:12:25","guid":{"rendered":"https:\/\/2014.nashville.wordcamp.org\/?post_type=wcb_session&#038;p=450601"},"modified":"2014-04-04T22:32:39","modified_gmt":"2014-04-05T03:32:39","slug":"custom-queries-how-what-when-where-why","status":"publish","type":"wcb_session","link":"https:\/\/nashville.wordcamp.org\/2014\/session\/custom-queries-how-what-when-where-why\/","title":{"rendered":"Custom Queries: How, What, When, Where &amp; Why"},"content":{"rendered":"<p>If you want to work with WordPress one of the very first things you need to understand is the concept of the \u201cthe loop.\u201d When information needs to be displayed on a page the loop makes a \u201cquery\u201d to the database, basically asking for said information. If you wish to customize any aspect of a theme or site you will want to learn how to customize the loop and the query to do exactly you want. There are three different ways you can customize the loop functionality: 1. query_posts(); 2. WP_Query(); and 3. get_posts(). In this presentation we will look at each of these three techniques. We will discuss what they have in common, what they do differently and when, where and why you would want to use each one. Concrete examples will  be used to take all the mystery out of making custom queries via the WordPress loop.<\/p>\n<p><a href=\"https:\/\/twitter.com\/search?q=%23wcn14customqueries&amp;src=typd\" target=\"_blank\">#wcn14customqueries<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>If you want to work with WordPress one of the very first things you need to understand is the concept of the \u201cthe loop.\u201d When information needs to be displayed on a page the loop makes a \u201cquery\u201d to the database, basically asking for said information. If you wish to customize any aspect of a [&hellip;]<\/p>\n","protected":false},"author":272720,"featured_media":0,"template":"","meta":{"_crdt_document":"","_wcpt_session_time":1399143600,"_wcpt_session_duration":3000,"_wcpt_session_type":"session","_wcpt_session_slides":"","_wcpt_session_video":"","_wcpt_speaker_id":[448451],"footnotes":""},"session_track":[280969],"session_category":[],"class_list":["post-450601","wcb_session","type-wcb_session","status-publish","hentry","wcb_track-track-2-intermediate"],"jetpack_sharing_enabled":true,"session_date_time":{"date":"May 3, 2014","time":"2:00 pm"},"session_speakers":[{"id":"448451","slug":"steve-wilkison","name":"Steve Wilkison","link":"https:\/\/nashville.wordcamp.org\/2014\/speaker\/steve-wilkison\/"}],"session_cats_rendered":null,"_links":{"self":[{"href":"https:\/\/nashville.wordcamp.org\/2014\/wp-json\/wp\/v2\/sessions\/450601","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/nashville.wordcamp.org\/2014\/wp-json\/wp\/v2\/sessions"}],"about":[{"href":"https:\/\/nashville.wordcamp.org\/2014\/wp-json\/wp\/v2\/types\/wcb_session"}],"version-history":[{"count":3,"href":"https:\/\/nashville.wordcamp.org\/2014\/wp-json\/wp\/v2\/sessions\/450601\/revisions"}],"predecessor-version":[{"id":473723,"href":"https:\/\/nashville.wordcamp.org\/2014\/wp-json\/wp\/v2\/sessions\/450601\/revisions\/473723"}],"speakers":[{"embeddable":true,"href":"https:\/\/nashville.wordcamp.org\/2014\/wp-json\/wp\/v2\/speakers\/448451"}],"author":[{"embeddable":true,"href":"https:\/\/nashville.wordcamp.org\/2014\/wp-json\/wporg\/v1\/users\/backpages"}],"wp:attachment":[{"href":"https:\/\/nashville.wordcamp.org\/2014\/wp-json\/wp\/v2\/media?parent=450601"}],"wp:term":[{"taxonomy":"wcb_track","embeddable":true,"href":"https:\/\/nashville.wordcamp.org\/2014\/wp-json\/wp\/v2\/session_track?post=450601"},{"taxonomy":"wcb_session_category","embeddable":true,"href":"https:\/\/nashville.wordcamp.org\/2014\/wp-json\/wp\/v2\/session_category?post=450601"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}