{"id":1056756,"date":"2016-01-15T11:05:10","date_gmt":"2016-01-15T19:05:10","guid":{"rendered":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/tribe_get_events-query-returns-past-recurring-events\/"},"modified":"2016-01-19T06:10:59","modified_gmt":"2016-01-19T14:10:59","slug":"tribe_get_events-query-returns-past-recurring-events","status":"closed","type":"topic","link":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/tribe_get_events-query-returns-past-recurring-events\/","title":{"rendered":"tribe_get_events query returns past recurring events"},"content":{"rendered":"<p>I have a relatively simple query that returns 3 current day events. It works fine except for recurring events. I have a weekly recurring event and the first instance of that recurring events always appears at the top of the results list. The site in question is under development and password protected so I cannot send a link, but please see my code below. The screenshot was taken today, January 15th and shows the weekly recurring event that began on 1\/12 along with two correct events that are scheduled for today. I hope you can suggest a fix. Thanks!<\/p>\n<p>Screenshot:<\/p>\n<blockquote class=\"imgur-embed-pub\" lang=\"en\" data-id=\"mSHFo8Z\"><p><a href=\"https:\/\/imgur.com\/mSHFo8Z\">View post on imgur.com<\/a><\/p><\/blockquote>\n<p><script async src=\"\/\/s.imgur.com\/min\/embed.js\" charset=\"utf-8\"><\/script><\/p>\n<pre><code>$start_date = date(&quot;Y-m-d&quot;);\n  $end_date = date(&quot;Y-m-d&quot;, strtotime(&quot;+1 day&quot;));\n  $events = tribe_get_events( array(\n    &#039;posts_per_page&#039; =&gt; 3,\n    &#039;eventDisplay&#039; =&gt; &#039;custom&#039;,\n    &#039;start_date&#039; =&gt; $start_date,\n    &#039;end_date&#039; =&gt; $end_date,\n  ) );<\/code><\/pre>\n","protected":false},"template":"","class_list":["post-1056756","topic","type-topic","status-closed","hentry"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v25.2 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>tribe_get_events query returns past recurring events -<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/tribe_get_events-query-returns-past-recurring-events\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"tribe_get_events query returns past recurring events -\" \/>\n<meta property=\"og:description\" content=\"I have a relatively simple query that returns 3 current day events. It works fine except for recurring events. I have a weekly recurring event and the first instance of that recurring events always appears at the top of the results list. The site in question is under development and password protected so I cannot [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/tribe_get_events-query-returns-past-recurring-events\/\" \/>\n<meta property=\"article:modified_time\" content=\"2016-01-19T14:10:59+00:00\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/tribe_get_events-query-returns-past-recurring-events\/\",\"url\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/tribe_get_events-query-returns-past-recurring-events\/\",\"name\":\"tribe_get_events query returns past recurring events -\",\"isPartOf\":{\"@id\":\"https:\/\/theeventscalendar.com\/support\/#website\"},\"datePublished\":\"2016-01-15T19:05:10+00:00\",\"dateModified\":\"2016-01-19T14:10:59+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/tribe_get_events-query-returns-past-recurring-events\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/tribe_get_events-query-returns-past-recurring-events\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/tribe_get_events-query-returns-past-recurring-events\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/theeventscalendar.com\/support\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Topics\",\"item\":\"https:\/\/theeventscalendar.com\/support\/topics\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Calendar Products\",\"item\":\"https:\/\/theeventscalendar.com\/support\/forums\/forum\/events\/\"},{\"@type\":\"ListItem\",\"position\":4,\"name\":\"Events Calendar PRO\",\"item\":\"https:\/\/theeventscalendar.com\/support\/forums\/forum\/events\/events-calendar-pro\/\"},{\"@type\":\"ListItem\",\"position\":5,\"name\":\"tribe_get_events query returns past recurring events\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/theeventscalendar.com\/support\/#website\",\"url\":\"https:\/\/theeventscalendar.com\/support\/\",\"name\":\"\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/theeventscalendar.com\/support\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"tribe_get_events query returns past recurring events -","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/tribe_get_events-query-returns-past-recurring-events\/","og_locale":"en_US","og_type":"article","og_title":"tribe_get_events query returns past recurring events -","og_description":"I have a relatively simple query that returns 3 current day events. It works fine except for recurring events. I have a weekly recurring event and the first instance of that recurring events always appears at the top of the results list. The site in question is under development and password protected so I cannot [&hellip;]","og_url":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/tribe_get_events-query-returns-past-recurring-events\/","article_modified_time":"2016-01-19T14:10:59+00:00","twitter_card":"summary_large_image","twitter_misc":{"Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/tribe_get_events-query-returns-past-recurring-events\/","url":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/tribe_get_events-query-returns-past-recurring-events\/","name":"tribe_get_events query returns past recurring events -","isPartOf":{"@id":"https:\/\/theeventscalendar.com\/support\/#website"},"datePublished":"2016-01-15T19:05:10+00:00","dateModified":"2016-01-19T14:10:59+00:00","breadcrumb":{"@id":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/tribe_get_events-query-returns-past-recurring-events\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/theeventscalendar.com\/support\/forums\/topic\/tribe_get_events-query-returns-past-recurring-events\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/tribe_get_events-query-returns-past-recurring-events\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/theeventscalendar.com\/support\/"},{"@type":"ListItem","position":2,"name":"Topics","item":"https:\/\/theeventscalendar.com\/support\/topics\/"},{"@type":"ListItem","position":3,"name":"Calendar Products","item":"https:\/\/theeventscalendar.com\/support\/forums\/forum\/events\/"},{"@type":"ListItem","position":4,"name":"Events Calendar PRO","item":"https:\/\/theeventscalendar.com\/support\/forums\/forum\/events\/events-calendar-pro\/"},{"@type":"ListItem","position":5,"name":"tribe_get_events query returns past recurring events"}]},{"@type":"WebSite","@id":"https:\/\/theeventscalendar.com\/support\/#website","url":"https:\/\/theeventscalendar.com\/support\/","name":"","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/theeventscalendar.com\/support\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"}]}},"_links":{"self":[{"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/topic\/1056756","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/topic"}],"about":[{"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/types\/topic"}],"version-history":[{"count":1,"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/topic\/1056756\/revisions"}],"predecessor-version":[{"id":1056809,"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/topic\/1056756\/revisions\/1056809"}],"wp:attachment":[{"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/media?parent=1056756"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}