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 > $start && $date < $end ) {
echo '<div class="col-xs-12">';
echo '<div class="row">';
echo '<div class="col-xs-12 col-md-8 col-lg-8 youtube-live">';
echo '<iframe width="100%" height="100%" src="https://www.youtube.com/embed/';
$youtubecode = tribe_get_custom_fields();
echo $youtubecode[ 'Youtube Code' ];
echo '" frameborder="0" allowfullscreen></iframe>';
echo '</div>';
echo '<div class="col-xs-12 col-md-4 col-lg-4 youtube-live-chat">';
echo '<iframe width="100%" height="100%" frameborder="1" src="https://www.youtube.com/live_chat?v=';
$youtubecode = tribe_get_custom_fields();
echo $youtubecode[ 'Youtube Code' ];
echo '&embed_domain=www.provideocoalition.com"></iframe>';
echo '</div>';
echo '</div>';
echo '</div>';
This is the original code that was being worked with.
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.