{"id":1143862,"date":"2016-07-25T15:33:31","date_gmt":"2016-07-25T22:33:31","guid":{"rendered":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/get-events-for-specific-day-only\/"},"modified":"2016-07-25T15:33:31","modified_gmt":"2016-07-25T22:33:31","slug":"get-events-for-specific-day-only","status":"closed","type":"topic","link":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/get-events-for-specific-day-only\/","title":{"rendered":"Get events for specific day ONLY"},"content":{"rendered":"<p>Hi,<\/p>\n<p>I have been looking through the documentation to see if I can search for the events falling on a specific day.<\/p>\n<p>I have found tribe_get_events() and this appeared to do what I need but I have run into the following cases:<br \/>\nI have three events: 1 full day event on 22nd July; 1 event that starts on 22nd July and finishes on 23rd July; 1 full day event on the 23rd July.<br \/>\nI am looking to display only the events that start on July 22nd.<br \/>\nI do:<\/p>\n<pre><code>tribe_get_events( array(\n&#039;posts_per_page&#039; =&gt; -1,\n&#039;start_date&#039; =&gt; &#039;2016-07-22&#039; ) );<\/code><\/pre>\n<p>This returns ALL events from July 22nd onwards.<\/p>\n<p>If I adjust my query to:<\/p>\n<pre><code>tribe_get_events( array(\n&#039;posts_per_page&#039; =&gt; -1,\n&#039;start_date&#039; =&gt; &#039;2016-07-22&#039;,\n&#039;end_date&#039; =&gt; &#039;2016-07-23&#039; ) );<\/code><\/pre>\n<p>This returns only the full day event for July 22nd.<\/p>\n<p>Is there any adjustment that I can make to this query to return events starting\/happening ONLY on the 22nd July no matter what their end date? I am looking at a situation where events can go for a day for up to an unknown length of time. At best, at the moment, I can guess the extreme and then manually filter for July 22nd only but would prefer a query that returns all correct results.<\/p>\n<p>For some context:<br \/>\nI am trying to edit the Month view of the Calendar so that if a day is clicked then the events for that day appear to the side of Calendar with some brief information (as opposed to the name displaying in the day area and hovering to find this information). As I am outside of the month loop I am not able to take advantage of tribe_events_get_current_month_day() (as far as I can tell ). I have attached visuals of what I am trying to attempt.<\/p>\n","protected":false},"template":"","class_list":["post-1143862","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>Get events for specific day ONLY -<\/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\/get-events-for-specific-day-only\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Get events for specific day ONLY -\" \/>\n<meta property=\"og:description\" content=\"Hi, I have been looking through the documentation to see if I can search for the events falling on a specific day. I have found tribe_get_events() and this appeared to do what I need but I have run into the following cases: I have three events: 1 full day event on 22nd July; 1 event [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/get-events-for-specific-day-only\/\" \/>\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=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/get-events-for-specific-day-only\/\",\"url\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/get-events-for-specific-day-only\/\",\"name\":\"Get events for specific day ONLY -\",\"isPartOf\":{\"@id\":\"https:\/\/theeventscalendar.com\/support\/#website\"},\"datePublished\":\"2016-07-25T22:33:31+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/get-events-for-specific-day-only\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/get-events-for-specific-day-only\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/get-events-for-specific-day-only\/#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\":\"Get events for specific day ONLY\"}]},{\"@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":"Get events for specific day ONLY -","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\/get-events-for-specific-day-only\/","og_locale":"en_US","og_type":"article","og_title":"Get events for specific day ONLY -","og_description":"Hi, I have been looking through the documentation to see if I can search for the events falling on a specific day. I have found tribe_get_events() and this appeared to do what I need but I have run into the following cases: I have three events: 1 full day event on 22nd July; 1 event [&hellip;]","og_url":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/get-events-for-specific-day-only\/","twitter_card":"summary_large_image","twitter_misc":{"Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/get-events-for-specific-day-only\/","url":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/get-events-for-specific-day-only\/","name":"Get events for specific day ONLY -","isPartOf":{"@id":"https:\/\/theeventscalendar.com\/support\/#website"},"datePublished":"2016-07-25T22:33:31+00:00","breadcrumb":{"@id":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/get-events-for-specific-day-only\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/theeventscalendar.com\/support\/forums\/topic\/get-events-for-specific-day-only\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/get-events-for-specific-day-only\/#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":"Get events for specific day ONLY"}]},{"@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\/1143862","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":0,"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/topic\/1143862\/revisions"}],"wp:attachment":[{"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/media?parent=1143862"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}