Advertisement
BakerMan

Basic Workaround for Single Day Multiday Event Bug

Oct 4th, 2012
115
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.44 KB | None | 0 0
  1. <?php
  2. // Is a single day being viewed here?
  3. if (tribe_is_day()) {
  4.     // Does the event span multiple days?
  5.     if (tribe_is_multiday()) {
  6.         // When does the event start and what day is today?
  7.         $startDate = tribe_get_start_date(null, false, 'Ymd');
  8.         $today = tribe_event_format_date(strtotime(get_query_var('eventDate')), false, 'Ymd');
  9.  
  10.         // If it started *before* today, let's give it a miss
  11.         if ($startDate < $today) continue;
  12.     }
  13. }
  14. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement