Advertisement
BakerMan

ECP single-venue.php unbalanced tags issue

Dec 6th, 2012
201
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 4.88 KB | None | 0 0
  1. <?php
  2. /**
  3. * Amended to help with an unbalanced tags problem.
  4. */
  5.  
  6. // Don't load directly
  7. if ( !defined('ABSPATH') ) { die('-1'); }
  8.  
  9. ?>
  10. <?php $venue_id = get_the_id(); ?>
  11. <span class="back"><a href="<?php echo tribe_get_events_link(); ?>"><?php _e('&laquo; Back to Events', 'tribe-events-calendar-pro'); ?></a></span>
  12. <div id="tribe-events-event-meta">
  13.     <div style='margin: 0 0 10px 0; float: right;'>
  14.         <?php echo tribe_get_embedded_map(get_the_ID(), '350px', '200px'); ?>
  15.     </div>
  16.     <dl class="column location" itemscope itemtype="http://schema.org/Place">
  17.         <dt class="venue-label venue-label-name"><?php _e('Name:', 'tribe-events-calendar-pro'); ?></dt>
  18.             <dd itemprop="name" class="venue-meta venue-meta-name"><?php the_title(); ?></dd>
  19.         <?php if(tribe_get_phone()) : ?>
  20.         <dt class="venue-label venue-label-phone"><?php _e('Phone:', 'tribe-events-calendar-pro'); ?></dt>
  21.             <dd itemprop="telephone" class="venue-meta venue-meta-phone"><?php echo tribe_get_phone(); ?></dd>
  22.         <?php endif; ?>
  23.  
  24.         <?php if( tribe_address_exists( get_the_ID() ) ) : ?>
  25.         <dt class="venue-label venue-label-address">
  26.             <?php _e('Address:', 'tribe-events-calendar-pro') ?><br />
  27.             <?php if( get_post_meta( get_the_ID(), '_EventShowMapLink', true ) == 'true' ) : ?>
  28.                 <a class="gmap" itemprop="maps" href="<?php echo tribe_get_map_link(); ?>" title="<?php _e('Click to view a Google Map', 'tribe-events-calendar-pro'); ?>" target="_blank"><?php _e('Google Map', 'tribe-events-calendar-pro' ); ?></a>
  29.             <?php endif; ?>
  30.         </dt>
  31.             <dd class="venue-meta venue-meta-address">
  32.             <?php echo tribe_get_full_address( get_the_ID() ); ?>
  33.             </dd>
  34.         <?php endif; ?>
  35.         <?php if ( get_the_content() != ''): ?>
  36.         <dt class="venue-label venue-label-description"><?php _e('Description:', 'tribe-events-calendar-pro'); ?></dt>
  37.         <dd class="venue-meta venue-meta-description"><?php the_content(); ?></dd>
  38.         <?php endif ?>
  39.     </dl>
  40. </div>
  41. <div id="tribe-events-loop" class="tribe-events-events post-list clearfix upcoming venue-events">
  42.     <?php
  43.     $venueEvents = tribe_get_events(array('venue'=>get_the_ID(), 'eventDisplay' => 'upcoming', 'posts_per_page' => -1));
  44.     global $post;
  45.     $first = true;
  46.     ?>
  47.     <?php if( sizeof($venueEvents) > 0 ): ?>
  48.         <h2 class='tribe-events-cal-title'>Upcoming Events At This Venue</h2>
  49.         <div id="tribe-events-content" class="events-archive">
  50.         <?php foreach( $venueEvents as $post ):
  51.             setup_postdata($post);  ?>
  52.             <div id="post-<?php the_ID(); ?>" <?php post_class($first ? 'tribe-events-event clearfix first': 'tribe-events-event clearfix' ); $first = false; ?> itemscope itemtype="http://schema.org/Event">
  53.                 <?php if ( tribe_is_new_event_day() ) : ?>
  54.                     <h4 class="event-day"><?php echo tribe_get_start_date( null, false ); ?></h4>
  55.                 <?php endif; ?>
  56.                 <?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>'); ?>
  57.                 <div class="entry-content tribe-events-event-entry" itemprop="description">
  58.                     <?php has_excerpt() ? the_excerpt() : the_content() ?>
  59.                 </div> <!-- End tribe-events-event-entry -->
  60.                 <div class="tribe-events-event-list-meta">
  61.                     <table>
  62.                         <?php if (tribe_is_multiday() || tribe_get_all_day() != 'yes'): ?>
  63.                         <tr>
  64.                             <td class="tribe-events-event-meta-desc"><?php _e('Start:', 'tribe-events-calendar-pro'); ?></td>
  65.                             <td class="tribe-events-event-meta-value"><meta itemprop="startDate" content="<?php echo tribe_get_start_date( null, false, 'Y-m-d' ); ?>" /><?php echo tribe_get_start_date(); ?></td>
  66.                         </tr>
  67.                         <tr>
  68.                             <td class="tribe-events-event-meta-desc"><?php _e('End:', 'tribe-events-calendar-pro'); ?></td>
  69.                             <td class="tribe-events-event-meta-value"><meta itemprop="endDate" content="<?php echo tribe_get_end_date( null, false, 'Y-m-d' ); ?>" /><?php echo tribe_get_end_date(); ?></td>
  70.                         </tr>
  71.                         <?php else: ?>
  72.                         <tr>
  73.                             <td class="tribe-events-event-meta-desc"><?php _e('Date:', 'tribe-events-calendar-pro'); ?></td>
  74.                             <td class="tribe-events-event-meta-value"><meta itemprop="startDate" content="<?php echo tribe_get_start_date( null, false, 'Y-m-d' ); ?>" /><?php echo tribe_get_start_date(); ?></td>
  75.                         </tr>
  76.                         <?php endif; ?>
  77.                         <?php
  78.                         $cost = tribe_get_cost();
  79.                         if ( !empty( $cost ) ) :
  80.                         ?>
  81.                         <tr>
  82.                             <td class="tribe-events-event-meta-desc"><?php _e('Cost:', 'tribe-events-calendar-pro'); ?></td>
  83.                             <td class="tribe-events-event-meta-value" itemprop="price"><?php echo $cost; ?></td>
  84.                         </tr>
  85.                         <?php endif; ?>
  86.                     </table>
  87.                 </div>
  88.             </div> <!-- End post -->
  89.         <?php endforeach; ?>
  90.         </div> <!-- #tribe-events-content -->
  91.     <?php endif; ?>
  92.     <?php // Reset the post and id to the venue post before comments template shows up.
  93.     $post = get_post($venue_id);
  94.     global $id;
  95.     $id = $venue_id;?>
  96. </div> <!-- #tribe-events-loop -->
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement