Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /**
- * Single Event Template
- * A single event. This displays the event title, description, meta, and
- * optionally, the Google map for the event.
- *
- * Override this template in your own theme by creating a file at [your-theme]/tribe-events/single-event.php
- *
- * @package TribeEventsCalendar
- * @since 2.1
- * @author Modern Tribe Inc.
- *
- */
- if ( !defined('ABSPATH') ) { die('-1'); }
- $event_id = get_the_ID();
- ?>
- <!-- START BOOTSTRAP LAYOUT -->
- <div class="row ">
- <div class="col-lg-4"> <a href="<?php echo tribe_get_events_link() ?>" class="btn btn-medium btn-primary col-lg-12">
- <?php _e( '« All Events', 'tribe-events-calendar' ) ?>
- </a> </div>
- <?php while ( have_posts() ) : the_post(); ?>
- <div class="col-lg-8">
- <div class="row event-heading">
- <div class="col-lg-8">
- <h1 class="event-title">
- <?php the_title(); ?>
- </h1>
- </div>
- <div class="col-lg-4">
- <h3 class="label label-info"><?php echo tribe_get_start_date( null, false, 'F n, Y' ); ?></h3>
- </div>
- </div>
- </div>
- </div>
- <div class="row">
- <div class="col-lg-4"> <?php echo tribe_event_featured_image(); ?>
- <button class="btn btn-medium btn-success col-lg-12" style="margin-bottom:20px;">
- <h4>Buy Tickets!</h4>
- </button>
- <table class="single-event table table-bordered">
- <?php if ( tribe_get_cost() ) : ?>
- <tr>
- <td>Cost:</td>
- <td><?php echo tribe_get_cost(); ?></td>
- </tr>
- <?php endif; ?>
- <?php if ( tribe_get_start_date () ) : ?>
- <tr>
- <td>Date:</td>
- <td><?php echo tribe_get_start_date( null, false, 'F n, Y' ); ?></td>
- </tr>
- <?php endif; ?>
- <?php if ( tribe_get_start_date() ) : ?>
- <tr>
- <td>Time:</td>
- <td><?php echo tribe_get_start_date( null, false, 'g:i a' ); ?></td>
- </tr>
- <? endif; ?>
- <?php if ( tribe_get_venue() ) : ?>
- <tr>
- <td>Venue:</td>
- <td><?php echo tribe_get_venue(get_the_ID(), true); ?></td>
- </tr>
- <?php endif; ?>
- <?php if ( tribe_get_venue_website_link() ) : ?>
- <tr>
- <td>Website:</td>
- <td><?php echo tribe_get_venue_website_link(); ?></td>
- </tr>
- <?php endif; ?>
- <?php if( tribe_address_exists( get_the_ID() ) ) : ?>
- <tr>
- <td>Address:</td>
- <td><?php tribe_the_full_address( get_the_ID() ); ?></td>
- </tr>
- <?php endif; ?>
- <?php if(tribe_get_phone()) : ?>
- <tr>
- <td>Phone:</td>
- <td><?php echo tribe_get_phone(); ?></td>
- </tr>
- <?php endif; ?>
- <tr>
- <td>Tags:</td>
- <td><?php echo tribe_meta_event_tags(); ?></td>
- </tr>
- </table>
- </div>
- <div class="col-lg-8">
- <div class="container">
- <!-------->
- <div id="content">
- <ul id="tabs" class="nav nav-tabs" data-tabs="tabs">
- <li class="active"><a href="#red" data-toggle="tab">Event Description</a></li>
- <li><a href="#orange" data-toggle="tab">Event Comments</a></li>
- </ul>
- <div id="my-tab-content" class="tab-content">
- <div class="tab-pane active" id="red">
- <p>
- <?php the_content(); ?>
- </p>
- <hr />
- <?php if( tribe_embed_google_map( get_the_ID() ) ) : ?>
- <?php if( tribe_address_exists( get_the_ID() ) ) tribe_the_embedded_map(); ?>
- <?php endif; ?>
- </div>
- <div class="tab-pane" id="orange">
- <?php if( get_post_type() == TribeEvents::POSTTYPE && tribe_get_option( 'showComments','no' ) == 'yes' ) { comments_template(); } ?>
- </div>
- </div>
- </div>
- </div>
- </div>
- <?php endwhile; ?>
- <!-- END BOOTSTRAP LAYOUT -->
- <script type="text/javascript">
- jQuery(document).ready(function ($) {
- $('#tabs').tab();
- });
- </script>
- </div>
- <!-- container -->
Advertisement
Add Comment
Please, Sign In to add comment