SHOW:
|
|
- or go back to the newest paste.
1 | - | <?php |
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'); } |
9 | + | if ( !defined('ABSPATH') ) { die('-1'); } |
10 | ||
11 | global $post; | |
12 | - | <?php |
12 | + | |
13 | $event_id = "{$post->ID}-{$day['daynum']}"; | |
14 | $start = tribe_get_start_date( $post, FALSE, 'U' ); | |
15 | $end = tribe_get_end_date( $post, FALSE, 'U' ); | |
16 | ||
17 | ?> | |
18 | ||
19 | <div id="tribe-events-event-<?php echo $event_id ?>" class="<?php tribe_events_event_classes() ?>"> | |
20 | <h3 class="tribe-events-month-event-title summary"><a href="<?php tribe_event_link( $post ); ?>" class="url"><?php the_title() ?></a></h3> | |
21 | ||
22 | <div id="tribe-events-tooltip-<?php echo $event_id; ?>" class="tribe-events-tooltip"> | |
23 | <h4 class="summary"><?php the_title() ?></h4> | |
24 | <div class="tribe-events-event-body"> | |
25 | - | <?php if (has_post_thumbnail() && 1 === $day['total_events']) : ?> |
25 | + | |
26 | - | <div class="tribe-events-event-thumb"><?php echo the_post_thumbnail(array(90,90));?></div> |
26 | + | |
27 | - | <?php endif; ?> |
27 | + | |
28 | <?php if (has_post_thumbnail() ) : ?> | |
29 | <div class="tribe-events-event-thumb"><?php echo the_post_thumbnail(array(90,90));?></div> | |
30 | <?php endif; ?> | |
31 | ||
32 | <p class="entry-summary description"> | |
33 | <?php echo get_the_excerpt() ?> | |
34 | </p><!-- .entry-summary --> | |
35 | ||
36 | </div><!-- .tribe-events-event-body --> | |
37 | <span class="tribe-events-arrow"></span> | |
38 | </div><!-- .tribe-events-tooltip --> | |
39 | ||
40 | </div><!-- #tribe-events-event-# --> | |
41 | ||
42 | <?php if (has_post_thumbnail() && 1 === $day['total_events']) : ?> | |
43 | <div class="<?php tribe_events_event_classes() ?> lone-thumb-container"> | |
44 | <div class="tribe-events-event-thumb"><?php echo the_post_thumbnail(array(90, 90)); ?></div> | |
45 | <div> | |
46 | - | </div><!-- #tribe-events-event-# --> |
46 | + | <?php endif; ?> |