bwade231

single-venue

Feb 27th, 2012
224
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 4.79 KB | None | 0 0
  1. <?php
  2. /**
  3. * The template for a venue.  By default it displays venue information and lists
  4. * events that occur at the specified venue.
  5. *
  6. * You can customize this view by putting a replacement file of the same name (single-venue.php) in the events/ directory of your theme.
  7. */
  8.  
  9. // Don't load directly
  10. if ( !defined('ABSPATH') ) { die('-1'); }
  11.  
  12. ?>
  13.  
  14. <div id="backbtn"><a href="<?php echo tribe_get_events_link(); ?>"class="back">
  15.   <?php _e('&laquo; Back to Events', 'tribe-events-calendar'); ?>
  16.   </a></div>
  17. <div>
  18.   <?php /*?><?php _e('Venue:', 'tribe-events-calendar-pro') ?><?php */?>
  19.   <h2 class="entry-title">
  20.     <?php the_title() ?>
  21.   </h2>
  22. </div>
  23. <div id="tribe-events-event-meta">
  24.   <div class="gmap-single-venue"> <?php echo tribe_get_embedded_map(get_the_ID(), '', '') ?> </div>
  25.   <dl class="details-single-info" itemscope itemtype="http://schema.org/Place">
  26.     <dt>
  27.       <?php _e('Venue:', 'tribe-events-calendar-pro') ?>
  28.     </dt>
  29.     <dd itemprop="name">
  30.       <?php the_title() ?>
  31.     </dd>
  32.     <?php if(tribe_get_phone()) : ?>
  33.     <dt>
  34.       <?php _e('Phone:', 'tribe-events-calendar-pro') ?>
  35.     </dt>
  36.     <dd itemprop="telephone"><?php echo tribe_get_phone(); ?></dd>
  37.     <?php endif; ?>
  38.     <?php if( tribe_address_exists( get_the_ID() ) ) : ?>
  39.     <dt>
  40.       <?php _e('Address:', 'tribe-events-calendar-pro') ?>
  41.       <br />
  42.     <dd>
  43.       <?php if( tribe_show_google_map_link( get_the_ID() ) ) : ?>
  44.       <a class="gmap" itemprop="maps" href="<?php echo tribe_get_map_link() ?>" title="<?php _e('Click to view a Google Map', 'tribe-events-calendar'); ?>" target="_blank">
  45.       <?php _e('Google Map', 'tribe-events-calendar' ); ?>
  46.       </a></dd>
  47.     <?php endif; ?>
  48.     </dt>
  49.     <dd> <?php echo tribe_get_full_address( get_the_ID() ); ?> </dd>
  50.     <?php endif; ?>
  51.     <?php if ( get_the_content() != ''): ?>
  52.     <dt>
  53.       <?php _e('Description:', 'tribe-events-calendar-pro') ?>
  54.     </dt>
  55.     <dd>
  56.       <?php the_content() ?>
  57.     </dd>
  58.     <?php endif ?>
  59.   </dl>
  60. </div>
  61. <div id="tribe-events-loop" class="venue-events">
  62.   <?php
  63.     $venueEvents = tribe_get_events(array('venue'=>get_the_ID()));
  64.     global $post;
  65.     $first = true;
  66.     ?>
  67.   <div class="list-post">
  68.     <?php if( sizeof($venueEvents) > 0 ): ?>
  69.     <h2 class='tribe-events-cal-title'>Upcoming Events At This Venue</h2>
  70.     <?php foreach( $venueEvents as $post ):
  71.             setup_postdata($post);  ?>
  72.     <div id="post-<?php the_ID() ?>" <?php post_class('tribe-events-event clearfix') ?> itemscope itemtype="http://schema.org/Event">
  73.       <div class="entry-heading">
  74.         <?php if ( tribe_is_new_event_day() ) : ?>
  75.         <h4 class="event-day"><?php echo tribe_get_start_date( null, false ); ?></h4>
  76.         <?php endif; ?>
  77.         <?php the_title('<h2 class="entry-title" itemprop="name"><a href="' . tribe_get_event_link() . '" title="' . the_title_attribute('echo=0') . '" rel="bookmark" itemprop="url">', '</a></h2>'); ?>
  78.       </div>
  79.       <div class="entry-content tribe-events-event-entry" itemprop="description">
  80.         <?php has_excerpt() ? the_excerpt() : the_content() ?>
  81.       </div>
  82.       <!-- End tribe-events-event-entry -->
  83.       <div class="tribe-events-event-list-meta" itemprop="location" itemscope itemtype="http://schema.org/Place">
  84.         <div class="list-info" itemprop="location" itemscope itemtype="http://schema.org/Place">
  85.           <?php if (tribe_is_multiday()): ?>
  86.           <div id="info-title">
  87.             <?php _e('Start:', 'tribe-events-calendar-pro') ?>
  88.           </div>
  89.           <div  id="info-content">
  90.             <meta itemprop="startDate" content="<?php echo tribe_get_start_date( null, false, 'Y-m-d' ); ?>" />
  91.             <?php echo tribe_get_start_date(); ?></div>
  92.           <div id="info-title">
  93.             <?php _e('End:', 'tribe-events-calendar-pro') ?>
  94.           </div>
  95.           <div id="info-content">
  96.             <meta itemprop="endDate" content="<?php echo tribe_get_end_date( null, false, 'Y-m-d' ); ?>" />
  97.             <?php echo tribe_get_end_date(); ?></div>
  98.           <?php else: ?>
  99.           <div id="info-title">
  100.             <?php _e('Date:', 'tribe-events-calendar-pro') ?>
  101.           </div>
  102.           <div id="info-content">
  103.             <meta itemprop="startDate" content="<?php echo tribe_get_start_date( null, false, 'Y-m-d' ); ?>" />
  104.             <?php echo tribe_get_start_date(); ?></div>
  105.           <?php endif; ?>
  106.           <?php
  107.                         $cost = tribe_get_cost();
  108.                         if ( !empty( $cost ) ) :
  109.                         ?>
  110.           <div id="info-title">
  111.             <?php _e('Cost:', 'tribe-events-calendar-pro') ?>
  112.           </div>
  113.           <div id="info-content" itemprop="price"><?php echo $cost; ?></div>
  114.           <?php endif; ?>
  115.         </div>
  116.       </div>
  117.     </div>
  118.     <!-- End post -->
  119.     <?php endforeach; ?>
  120.     <?php endif; ?>
  121.   </div>
  122. </div>
Advertisement
Add Comment
Please, Sign In to add comment