{"id":1250710,"date":"2017-03-07T12:15:35","date_gmt":"2017-03-07T20:15:35","guid":{"rendered":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/using-tribe_event_is_on_date-even-more-conditionally-part-2\/"},"modified":"2017-03-08T20:06:26","modified_gmt":"2017-03-09T04:06:26","slug":"using-tribe_event_is_on_date-even-more-conditionally-part-2","status":"closed","type":"topic","link":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/using-tribe_event_is_on_date-even-more-conditionally-part-2\/","title":{"rendered":"Using tribe_event_is_on_date() even more conditionally &#8211; Part 2"},"content":{"rendered":"<p>Hi there,<\/p>\n<p>Previously Josh helped me out with this issue on the original thread, but now I have another request.<\/p>\n<pre><code>date_default_timezone_set( 'America\/Los_Angeles' );\r\n$date = date( 'U' );\r\n$start = tribe_get_start_date( get_the_ID(), true, 'U' );\r\n$end = tribe_get_end_date( get_the_ID(), true, 'U' );\r\n \r\nif ( $date &gt; $start &amp;&amp; $date &lt; $end ) {\r\n\techo '&lt;div class=\"col-xs-12\"&gt;';\r\n\techo '&lt;div class=\"row\"&gt;';\r\n\techo '&lt;div class=\"col-xs-12 col-md-8 col-lg-8 youtube-live\"&gt;';\r\n\techo '&lt;iframe width=\"100%\" height=\"100%\" src=\"https:\/\/www.youtube.com\/embed\/';\r\n\t$youtubecode = tribe_get_custom_fields(); \r\n\techo $youtubecode[ 'Youtube Code' ];\r\n\techo '\" frameborder=\"0\" allowfullscreen&gt;&lt;\/iframe&gt;';\r\n\techo '&lt;\/div&gt;';\r\n\techo '&lt;div class=\"col-xs-12 col-md-4 col-lg-4 youtube-live-chat\"&gt;';\r\n\techo '&lt;iframe width=\"100%\" height=\"100%\" frameborder=\"1\" src=\"https:\/\/www.youtube.com\/live_chat?v=';\r\n\t$youtubecode = tribe_get_custom_fields(); \r\n\techo $youtubecode[ 'Youtube Code' ];\r\n\techo '&amp;embed_domain=www.provideocoalition.com\"&gt;&lt;\/iframe&gt;';\r\n\techo '&lt;\/div&gt;';\r\n\techo '&lt;\/div&gt;';\r\n\techo '&lt;\/div&gt;';<\/code><\/pre>\n<p>This is the original code that was being worked with.<\/p>\n<p>Our goal is this. We are setting our events to run at 11:30AM PST. However, we want this code to initialized at 11:00AM PST. That would mean 30 minutes before the start time.<\/p>\n","protected":false},"template":"","class_list":["post-1250710","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>Using tribe_event_is_on_date() even more conditionally - Part 2 -<\/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\/using-tribe_event_is_on_date-even-more-conditionally-part-2\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Using tribe_event_is_on_date() even more conditionally - Part 2 -\" \/>\n<meta property=\"og:description\" content=\"Hi there, Previously Josh helped me out with this issue on the original thread, but now I have another request. date_default_timezone_set( &#039;America\/Los_Angeles&#039; ); $date = date( &#039;U&#039; ); $start = tribe_get_start_date( get_the_ID(), true, &#039;U&#039; ); $end = tribe_get_end_date( get_the_ID(), true, &#039;U&#039; ); if ( $date &gt; $start &amp;&amp; $date &lt; $end ) { echo &#039;&lt;div [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/using-tribe_event_is_on_date-even-more-conditionally-part-2\/\" \/>\n<meta property=\"article:modified_time\" content=\"2017-03-09T04:06:26+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\/using-tribe_event_is_on_date-even-more-conditionally-part-2\/\",\"url\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/using-tribe_event_is_on_date-even-more-conditionally-part-2\/\",\"name\":\"Using tribe_event_is_on_date() even more conditionally - Part 2 -\",\"isPartOf\":{\"@id\":\"https:\/\/theeventscalendar.com\/support\/#website\"},\"datePublished\":\"2017-03-07T20:15:35+00:00\",\"dateModified\":\"2017-03-09T04:06:26+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/using-tribe_event_is_on_date-even-more-conditionally-part-2\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/using-tribe_event_is_on_date-even-more-conditionally-part-2\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/using-tribe_event_is_on_date-even-more-conditionally-part-2\/#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\":\"Using tribe_event_is_on_date() even more conditionally &#8211; Part 2\"}]},{\"@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":"Using tribe_event_is_on_date() even more conditionally - Part 2 -","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\/using-tribe_event_is_on_date-even-more-conditionally-part-2\/","og_locale":"en_US","og_type":"article","og_title":"Using tribe_event_is_on_date() even more conditionally - Part 2 -","og_description":"Hi there, Previously Josh helped me out with this issue on the original thread, but now I have another request. date_default_timezone_set( 'America\/Los_Angeles' ); $date = date( 'U' ); $start = tribe_get_start_date( get_the_ID(), true, 'U' ); $end = tribe_get_end_date( get_the_ID(), true, 'U' ); if ( $date &gt; $start &amp;&amp; $date &lt; $end ) { echo '&lt;div [&hellip;]","og_url":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/using-tribe_event_is_on_date-even-more-conditionally-part-2\/","article_modified_time":"2017-03-09T04:06:26+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\/using-tribe_event_is_on_date-even-more-conditionally-part-2\/","url":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/using-tribe_event_is_on_date-even-more-conditionally-part-2\/","name":"Using tribe_event_is_on_date() even more conditionally - Part 2 -","isPartOf":{"@id":"https:\/\/theeventscalendar.com\/support\/#website"},"datePublished":"2017-03-07T20:15:35+00:00","dateModified":"2017-03-09T04:06:26+00:00","breadcrumb":{"@id":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/using-tribe_event_is_on_date-even-more-conditionally-part-2\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/theeventscalendar.com\/support\/forums\/topic\/using-tribe_event_is_on_date-even-more-conditionally-part-2\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/using-tribe_event_is_on_date-even-more-conditionally-part-2\/#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":"Using tribe_event_is_on_date() even more conditionally &#8211; Part 2"}]},{"@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\/1250710","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\/1250710\/revisions"}],"predecessor-version":[{"id":1251481,"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/topic\/1250710\/revisions\/1251481"}],"wp:attachment":[{"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/media?parent=1250710"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}