{"id":13220,"date":"2012-01-11T13:51:56","date_gmt":"2012-01-11T21:51:56","guid":{"rendered":"http:\/\/tri.be\/support\/forums\/topic\/all-day-event-problems\/"},"modified":"2015-07-03T17:00:04","modified_gmt":"2015-07-04T00:00:04","slug":"all-day-event-problems","status":"closed","type":"topic","link":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/all-day-event-problems\/","title":{"rendered":"All Day Event Problems"},"content":{"rendered":"<p>In your FAQ&#8217;s you describe how to check for &#8220;All Day Events&#8221; and change the display in the template accordingly<\/p>\n<p>I use the following date format: $event_date = date(&#8216;F j, Y, g:i a&#8217;,strtotime($e-&gt;EventStartDate));. But I want &#8220;All Day&#8221; events formatted in such a way that they don&#8217;t show as starting at 12 am. Is it possible to form an if statement to check for all day events?<br \/>\nIt is. This code should allow you to check whether it&#8217;s an all-day event in the loop: <code>if (get_post_meta($e-&gt;ID, 'EventAllDay', true) == 'yes') { \/\/ do something.<\/code><\/p>\n<p>However that statement is wrong.  The function returns a boolean value, so it will never evaluate to &#8220;yes&#8221;.  Also, the function is broken.  It returns bool(false) no matter which way the &#8220;All Day Event&#8221; box is checked in the event entry screen.<\/p>\n<p><code>ID, 'EventAllDay', true)); ?&gt;<\/code> can be viewed in the left sidebar here :<\/p>\n<p>http:\/\/www.barnumfestival.com.php5-19.dfw1-2.websitetestlink.com\/event\/tom-thumb-lavinia-warren-contest\/<\/p>\n<p>Contact me directly at jason@odonnellco.com and I can provide you with an administrative login to the wordpress installation so you can toggle the checkbox for yourself.<\/p>\n","protected":false},"template":"","class_list":["post-13220","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>All Day Event Problems -<\/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\/all-day-event-problems\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"All Day Event Problems -\" \/>\n<meta property=\"og:description\" content=\"In your FAQ&#8217;s you describe how to check for &#8220;All Day Events&#8221; and change the display in the template accordingly I use the following date format: $event_date = date(&#8216;F j, Y, g:i a&#8217;,strtotime($e-&gt;EventStartDate));. But I want &#8220;All Day&#8221; events formatted in such a way that they don&#8217;t show as starting at 12 am. Is it [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/all-day-event-problems\/\" \/>\n<meta property=\"article:modified_time\" content=\"2015-07-04T00:00:04+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\/all-day-event-problems\/\",\"url\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/all-day-event-problems\/\",\"name\":\"All Day Event Problems -\",\"isPartOf\":{\"@id\":\"https:\/\/theeventscalendar.com\/support\/#website\"},\"datePublished\":\"2012-01-11T21:51:56+00:00\",\"dateModified\":\"2015-07-04T00:00:04+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/all-day-event-problems\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/all-day-event-problems\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/all-day-event-problems\/#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\":\"All Day Event Problems\"}]},{\"@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":"All Day Event Problems -","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\/all-day-event-problems\/","og_locale":"en_US","og_type":"article","og_title":"All Day Event Problems -","og_description":"In your FAQ&#8217;s you describe how to check for &#8220;All Day Events&#8221; and change the display in the template accordingly I use the following date format: $event_date = date(&#8216;F j, Y, g:i a&#8217;,strtotime($e-&gt;EventStartDate));. But I want &#8220;All Day&#8221; events formatted in such a way that they don&#8217;t show as starting at 12 am. Is it [&hellip;]","og_url":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/all-day-event-problems\/","article_modified_time":"2015-07-04T00:00:04+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\/all-day-event-problems\/","url":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/all-day-event-problems\/","name":"All Day Event Problems -","isPartOf":{"@id":"https:\/\/theeventscalendar.com\/support\/#website"},"datePublished":"2012-01-11T21:51:56+00:00","dateModified":"2015-07-04T00:00:04+00:00","breadcrumb":{"@id":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/all-day-event-problems\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/theeventscalendar.com\/support\/forums\/topic\/all-day-event-problems\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/all-day-event-problems\/#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":"All Day Event Problems"}]},{"@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\/13220","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\/13220\/revisions"}],"predecessor-version":[{"id":975271,"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/topic\/13220\/revisions\/975271"}],"wp:attachment":[{"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/media?parent=13220"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}