Advertisement
BakerMan

month/single-day with thumb in grid

Oct 9th, 2013
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.51 KB | None | 0 0
  1. <?php
  2. /**
  3.  * Adapted version of month/single-event.php.
  4.  *
  5.  * Displays the post thumb in the grid *only* if it is the
  6.  * only event showing that day.
  7.  */
  8.  
  9. if ( !defined('ABSPATH') ) { die('-1'); }
  10. ?>
  11.  
  12. <?php
  13.  
  14. global $post;
  15. $day = tribe_events_get_current_month_day();
  16. $event_id = "{$post->ID}-{$day['daynum']}";
  17. $start = tribe_get_start_date( $post, FALSE, 'U' );
  18. $end = tribe_get_end_date( $post, FALSE, 'U' );
  19.  
  20. ?>
  21.  
  22. <div id="tribe-events-event-<?php echo $event_id ?>" class="<?php tribe_events_event_classes() ?>">
  23.     <h3 class="tribe-events-month-event-title summary"><a href="<?php tribe_event_link( $post ); ?>" class="url"><?php the_title() ?></a></h3>
  24.  
  25.     <?php if (has_post_thumbnail() && 1 === $day['total_events']) : ?>
  26.         <div class="tribe-events-event-thumb"><?php echo the_post_thumbnail(array(90,90));?></div>
  27.     <?php endif; ?>
  28.  
  29.     <div id="tribe-events-tooltip-<?php echo $event_id; ?>" class="tribe-events-tooltip">
  30.         <h4 class="summary"><?php the_title() ?></h4>
  31.         <div class="tribe-events-event-body">
  32.  
  33.             <?php echo tribe_events_event_schedule_details() ?>
  34.  
  35.             <?php if (has_post_thumbnail() ) : ?>
  36.                 <div class="tribe-events-event-thumb"><?php echo the_post_thumbnail(array(90,90));?></div>
  37.             <?php endif; ?>
  38.  
  39.             <p class="entry-summary description">
  40.                 <?php echo get_the_excerpt() ?>
  41.             </p><!-- .entry-summary -->
  42.  
  43.         </div><!-- .tribe-events-event-body -->
  44.         <span class="tribe-events-arrow"></span>
  45.     </div><!-- .tribe-events-tooltip -->
  46. </div><!-- #tribe-events-event-# -->
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement