Advertisement
Guest User

Remove event titles from single-day.php

a guest
Sep 19th, 2014
267
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.47 KB | None | 0 0
  1. <?php
  2. /**
  3.  * Month View Single Day
  4.  * This file contains one day in the month grid
  5.  *
  6.  * This is an override that removes the event names from the month view and displays only the "View All" link.
  7.  *
  8.  * @package TribeEventsCalendar
  9.  *
  10.  */
  11.  
  12. if ( !defined('ABSPATH') ) { die('-1'); } ?>
  13.  
  14. <?php
  15. $day = tribe_events_get_current_month_day();
  16. ?>
  17.  
  18. <?php if ( $day['date'] != 'previous' && $day['date'] != 'next' ) : ?>
  19.  
  20.     <!-- Day Header -->
  21.     <div id="tribe-events-daynum-<?php echo $day['daynum'] ?>">
  22.  
  23.         <?php if ( $day['total_events'] > 0 && tribe_events_is_view_enabled( 'day' ) ) { ?>
  24.             <a href="<?php echo tribe_get_day_link( $day['date'] ) ?>"><?php echo $day['daynum'] ?></a>
  25.         <?php } else { ?>
  26.             <?php echo $day['daynum'] ?>
  27.         <?php } ?>
  28.  
  29.     </div>
  30.  
  31.     <!-- Events List -->
  32.     <?php while ($day['events']->have_posts()) : $day['events']->the_post() ?>
  33.         <?php tribe_get_template_part('month/single', 'event') ?>
  34.     <?php endwhile; ?>
  35.  
  36.     <!-- View More -->
  37.     <?php if ( $day['view_more'] && tribe_events_is_view_enabled( 'day' ) ) : ?>
  38.         <div class="tribe-events-viewmore">
  39.             <?php
  40.                 if($day['total_events'] > 1 || $day['total_events'] == 0) {
  41.                     $events_label = __( 'Events ', 'tribe-events-calendar' );
  42.                 } else {
  43.                     $events_label = __( 'Event ', 'tribe-events-calendar' );
  44.                 }
  45.             ?>
  46.             <a href="<?php echo $day['view_more'] ?>">View All <?php echo $day['total_events'] . " " . $events_label ?> &raquo;</a>
  47.         </div>
  48.     <?php endif ?>
  49.  
  50. <?php endif; ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement