Forum Replies Created
-
AuthorPosts
-
RANDY
ParticipantCourtney,
Actually, I just turned off the cache plugin for my dev site, which is why you don’t see the issue.
Here is the live site with the issue: https://www.provideocoalition.com/events/month/?bb2_screener_=1490030837+199.48.121.227+199.48.121.227
-
This reply was modified 9 years, 1 month ago by
RANDY.
March 17, 2017 at 3:26 pm in reply to: Using tribe_event_is_on_date() even more conditionally – Part 2 #1256111RANDY
ParticipantAwesome thanks!
RANDY
ParticipantHunter,
So are we not allowed to use custom fields in the organizer/presenter posts? Every time I try, nothing gets displayed. We originally fixed this issue by purchasing the plugin and the plugin then allowed us to build custom fields but only in event posts, not organizer/presenter posts.
November 22, 2016 at 7:22 am in reply to: Using tribe_event_is_on_date() even more conditionally #1195775RANDY
ParticipantJosh,
We did it! It is working as it should now!
For the option in the admin backend, I noticed there was a Timezone mode set to “Use the local timezones for each event”. Should I change this?
RANDY
ParticipantNico,
The code is not working as expected yet.
For the setting under events, it is currently set to:
Timezone mode: Use the local timezones for each event
Show timezone: UncheckedTime zone for general WordPress is correctly set for Los Angeles.
November 21, 2016 at 7:36 am in reply to: Using tribe_event_is_on_date() even more conditionally #1195310RANDY
ParticipantJosh,
string(10) “1479742196” is spit out from the dump.
You know, something weird about it. So here’s what happens.
This code only works when the initial event is created for the day (8AM – 5PM). So it spits out the YouTube player and everything, which is correct. However, once I go back and edit the event time to a smaller window (8AM – 3:30PM) it will stop spitting out the YouTube player. But, if I go to let’s say 8AM to 11PM, it will spit out the YouTube player again.
RANDY
Participant“The ended code has put the ongoing event back in Past Events again. It looks like I might have to mess with the time to achieve what we want in this case.”
Oops what I meant to say was:
The new code has put the ongoing event back in Past Events again.
November 18, 2016 at 8:26 am in reply to: Using tribe_event_is_on_date() even more conditionally #1194476RANDY
ParticipantHi Josh,
This is show it should be formatted correct?
<?php $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>'; } ?>If so, it didn’t work unfortunately.
RANDY
ParticipantNico,
It’s happening in both.
For example, we have an event today (11/18/16) and it runs from 8AM to 5PM.
It is 2:30PM right now but the event is showing in both Past Events and Upcoming Events. This should not be the case since the event is technically still ongoing and should stay in Upcoming until it reaches the end time.
The ended code has put the ongoing event back in Past Events again. It looks like I might have to mess with the time to achieve what we want in this case.
RANDY
ParticipantOkay, I got something going now.
$events = tribe_get_events( array( 'posts_per_page' => 2, 'order' => DESC, 'end_date' => date( 'Y-m-d 00:00:00' ), 'eventDisplay' => 'custom' ) );The issue is that this ALMOST works. I still need to get it the last hour, minute, and second as well if I can.
RANDY
Participantelseif ( is_tax() ) { // Removing for now, causing fatal errors issues //self::$taxonomy = get_queried_object()->slug; self::$targeting['taxonomy'] = $taxonomy; self::$targeting['term'] = get_query_var( $taxonomy ); }RANDY
ParticipantFatal error: Access to undeclared static property: WP_DFP_Frontend::$taxonomy in /home/phuynh/html/provideocoalition.com/web/app/plugins/wp-dfp/wp-dfp-frontend.php on line 150
WP_DEBUG has found this issue.
RANDY
ParticipantI figured out that the plugin it was interfering with was our ad plugin. Mainly the ones in the header.
The issue is that it works on every other Tribe event but the category Tribe events, which is weird, any thoughts?
November 17, 2016 at 7:19 am in reply to: Using tribe_event_is_on_date() even more conditionally #1193825RANDY
ParticipantHi Josh,
Sure thing!
Here is my code snippet:
<?php if(tribe_event_is_on_date() == true){ 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>'; } ?>So this piece of code is suppose to pop up a Youtube video when we are streaming an event. However, we only want it to appear at the start time of the event and then disappear at the end time of the event.
November 16, 2016 at 11:31 am in reply to: Pulling Past and Upcoming Event In Single Event Page #1193383RANDY
ParticipantHere is my code for anyone. Of course, change the classes and such.
<?php // Ensure the global $post variable is in scope global $post; // Retrieve the past 2 events $events = tribe_get_events( array( 'posts_per_page' => 2, 'order' => DESC, 'eventDisplay' => 'past', ) ); // Loop through the events: set up each one as // the current post then use template tags to // display the title and content foreach ( $events as $post ) { setup_postdata( $post ); // This time, let's throw in an event-specific // template tag to show the date after the title! echo '<div class="type-tribe_events"><div class="tribe-mini-calendar-event">'; echo '<div class="col-xs-12 col-sm-12 col-md-4 col-lg-4">'; echo tribe_event_featured_image( null, 'thumbnail' ); echo '</div><div class="col-xs-12 col-sm-12 col-md-8 col-lg-8"><h2><a href="">'; echo "$post->post_title"; echo '</a></h2>'; echo '<p class="tribe-events-schedule"><span class="tribe-event-date-start">On-Demand Available</span> '; echo tribe_events_get_the_excerpt( null, wp_kses_allowed_html( 'post' ) ); echo '</div></div></div>'; } ?> -
This reply was modified 9 years, 1 month ago by
-
AuthorPosts
