Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /**
- * The template for a venue. By default it displays venue information and lists
- * events that occur at the specified venue.
- *
- * You can customize this view by putting a replacement file of the same name (single-venue.php) in the events/ directory of your theme.
- */
- // Don't load directly
- if ( !defined('ABSPATH') ) { die('-1'); }
- ?>
- <div id="backbtn"><a href="<?php echo tribe_get_events_link(); ?>"class="back">
- <?php _e('« Back to Events', 'tribe-events-calendar'); ?>
- </a></div>
- <div>
- <?php /*?><?php _e('Venue:', 'tribe-events-calendar-pro') ?><?php */?>
- <h2 class="entry-title">
- <?php the_title() ?>
- </h2>
- </div>
- <div id="tribe-events-event-meta">
- <div class="gmap-single-venue"> <?php echo tribe_get_embedded_map(get_the_ID(), '', '') ?> </div>
- <dl class="details-single-info" itemscope itemtype="http://schema.org/Place">
- <dt>
- <?php _e('Venue:', 'tribe-events-calendar-pro') ?>
- </dt>
- <dd itemprop="name">
- <?php the_title() ?>
- </dd>
- <?php if(tribe_get_phone()) : ?>
- <dt>
- <?php _e('Phone:', 'tribe-events-calendar-pro') ?>
- </dt>
- <dd itemprop="telephone"><?php echo tribe_get_phone(); ?></dd>
- <?php endif; ?>
- <?php if( tribe_address_exists( get_the_ID() ) ) : ?>
- <dt>
- <?php _e('Address:', 'tribe-events-calendar-pro') ?>
- <br />
- <dd>
- <?php if( tribe_show_google_map_link( get_the_ID() ) ) : ?>
- <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">
- <?php _e('Google Map', 'tribe-events-calendar' ); ?>
- </a></dd>
- <?php endif; ?>
- </dt>
- <dd> <?php echo tribe_get_full_address( get_the_ID() ); ?> </dd>
- <?php endif; ?>
- <?php if ( get_the_content() != ''): ?>
- <dt>
- <?php _e('Description:', 'tribe-events-calendar-pro') ?>
- </dt>
- <dd>
- <?php the_content() ?>
- </dd>
- <?php endif ?>
- </dl>
- </div>
- <div id="tribe-events-loop" class="venue-events">
- <?php
- $venueEvents = tribe_get_events(array('venue'=>get_the_ID()));
- global $post;
- $first = true;
- ?>
- <div class="list-post">
- <?php if( sizeof($venueEvents) > 0 ): ?>
- <h2 class='tribe-events-cal-title'>Upcoming Events At This Venue</h2>
- <?php foreach( $venueEvents as $post ):
- setup_postdata($post); ?>
- <div id="post-<?php the_ID() ?>" <?php post_class('tribe-events-event clearfix') ?> itemscope itemtype="http://schema.org/Event">
- <div class="entry-heading">
- <?php if ( tribe_is_new_event_day() ) : ?>
- <h4 class="event-day"><?php echo tribe_get_start_date( null, false ); ?></h4>
- <?php endif; ?>
- <?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>'); ?>
- </div>
- <div class="entry-content tribe-events-event-entry" itemprop="description">
- <?php has_excerpt() ? the_excerpt() : the_content() ?>
- </div>
- <!-- End tribe-events-event-entry -->
- <div class="tribe-events-event-list-meta" itemprop="location" itemscope itemtype="http://schema.org/Place">
- <div class="list-info" itemprop="location" itemscope itemtype="http://schema.org/Place">
- <?php if (tribe_is_multiday()): ?>
- <div id="info-title">
- <?php _e('Start:', 'tribe-events-calendar-pro') ?>
- </div>
- <div id="info-content">
- <meta itemprop="startDate" content="<?php echo tribe_get_start_date( null, false, 'Y-m-d' ); ?>" />
- <?php echo tribe_get_start_date(); ?></div>
- <div id="info-title">
- <?php _e('End:', 'tribe-events-calendar-pro') ?>
- </div>
- <div id="info-content">
- <meta itemprop="endDate" content="<?php echo tribe_get_end_date( null, false, 'Y-m-d' ); ?>" />
- <?php echo tribe_get_end_date(); ?></div>
- <?php else: ?>
- <div id="info-title">
- <?php _e('Date:', 'tribe-events-calendar-pro') ?>
- </div>
- <div id="info-content">
- <meta itemprop="startDate" content="<?php echo tribe_get_start_date( null, false, 'Y-m-d' ); ?>" />
- <?php echo tribe_get_start_date(); ?></div>
- <?php endif; ?>
- <?php
- $cost = tribe_get_cost();
- if ( !empty( $cost ) ) :
- ?>
- <div id="info-title">
- <?php _e('Cost:', 'tribe-events-calendar-pro') ?>
- </div>
- <div id="info-content" itemprop="price"><?php echo $cost; ?></div>
- <?php endif; ?>
- </div>
- </div>
- </div>
- <!-- End post -->
- <?php endforeach; ?>
- <?php endif; ?>
- </div>
- </div>
Advertisement
Add Comment
Please, Sign In to add comment