{"id":4658287,"date":"2014-02-28T04:20:46","date_gmt":"2014-02-28T04:20:46","guid":{"rendered":"https:\/\/wordpress.org\/support\/topic\/getting-past-events-when-using-wp_query\/"},"modified":"2016-08-21T16:47:15","modified_gmt":"2016-08-21T16:47:15","slug":"getting-past-events-when-using-wp_query","status":"closed","type":"topic","link":"https:\/\/wordpress.org\/support\/topic\/getting-past-events-when-using-wp_query\/","title":{"rendered":"Getting past events when using wp_query"},"content":{"rendered":"<p>I believe i did this once in the past but I cant find the code!<\/p>\n<p>Something like so:<\/p>\n<pre><code>$args = array(\n   &#039;posts_per_page&#039; =&gt; 6,\n   &#039;post_type&#039; =&gt; &#039;event&#039;,\n   &#039;meta_query&#039; =&gt; array(\n      array(\n      &#039;key&#039; =&gt; &#039;scope&#039;,\n      &#039;value&#039; =&gt; &#039;past&#039;\n      )\n   ),\n&#039;paged&#039; =&gt; $paged\n);<\/code><\/pre>\n<p>thanks,<br \/>\nalvar<\/p>\n<p>https:\/\/wordpress.org\/plugins\/events-manager\/<\/p>\n","protected":false},"template":"","class_list":["post-4658287","topic","type-topic","status-closed","hentry"],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/4658287","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic"}],"about":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/types\/topic"}],"version-history":[{"count":0,"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/4658287\/revisions"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/media?parent=4658287"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}