Guest User

Untitled

a guest
Aug 19th, 2013
149
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.97 KB | None | 0 0
  1. <?php
  2. /**
  3. * Single Event Template
  4. * A single event. This displays the event title, description, meta, and
  5. * optionally, the Google map for the event.
  6. *
  7. * Override this template in your own theme by creating a file at [your-theme]/tribe-events/single-event.php
  8. *
  9. * @package TribeEventsCalendar
  10. * @since 2.1
  11. * @author Modern Tribe Inc.
  12. *
  13. */
  14.  
  15. if ( !defined('ABSPATH') ) { die('-1'); }
  16.  
  17. $event_id = get_the_ID();
  18.  
  19. ?>
  20.  
  21. <!-- START BOOTSTRAP LAYOUT -->
  22.  
  23. <div class="row ">
  24. <div class="col-lg-4"> <a href="<?php echo tribe_get_events_link() ?>" class="btn btn-medium btn-primary col-lg-12">
  25. <?php _e( '&laquo; All Events', 'tribe-events-calendar' ) ?>
  26. </a> </div>
  27. <?php while ( have_posts() ) : the_post(); ?>
  28. <div class="col-lg-8">
  29. <div class="row event-heading">
  30. <div class="col-lg-8">
  31. <h1 class="event-title">
  32. <?php the_title(); ?>
  33. </h1>
  34. </div>
  35. <div class="col-lg-4">
  36. <h3 class="label label-info"><?php echo tribe_get_start_date( null, false, 'F n, Y' ); ?></h3>
  37. </div>
  38. </div>
  39. </div>
  40. </div>
  41. <div class="row">
  42. <div class="col-lg-4"> <?php echo tribe_event_featured_image(); ?>
  43. <button class="btn btn-medium btn-success col-lg-12" style="margin-bottom:20px;">
  44. <h4>Buy Tickets!</h4>
  45. </button>
  46. <table class="single-event table table-bordered">
  47. <?php if ( tribe_get_cost() ) : ?>
  48. <tr>
  49. <td>Cost:</td>
  50. <td><?php echo tribe_get_cost(); ?></td>
  51. </tr>
  52. <?php endif; ?>
  53. <?php if ( tribe_get_start_date () ) : ?>
  54. <tr>
  55. <td>Date:</td>
  56. <td><?php echo tribe_get_start_date( null, false, 'F n, Y' ); ?></td>
  57. </tr>
  58. <?php endif; ?>
  59. <?php if ( tribe_get_start_date() ) : ?>
  60. <tr>
  61. <td>Time:</td>
  62. <td><?php echo tribe_get_start_date( null, false, 'g:i a' ); ?></td>
  63. </tr>
  64. <? endif; ?>
  65. <?php if ( tribe_get_venue() ) : ?>
  66. <tr>
  67. <td>Venue:</td>
  68. <td><?php echo tribe_get_venue(get_the_ID(), true); ?></td>
  69. </tr>
  70. <?php endif; ?>
  71. <?php if ( tribe_get_venue_website_link() ) : ?>
  72. <tr>
  73. <td>Website:</td>
  74. <td><?php echo tribe_get_venue_website_link(); ?></td>
  75. </tr>
  76. <?php endif; ?>
  77. <?php if( tribe_address_exists( get_the_ID() ) ) : ?>
  78. <tr>
  79. <td>Address:</td>
  80. <td><?php tribe_the_full_address( get_the_ID() ); ?></td>
  81. </tr>
  82. <?php endif; ?>
  83. <?php if(tribe_get_phone()) : ?>
  84. <tr>
  85. <td>Phone:</td>
  86. <td><?php echo tribe_get_phone(); ?></td>
  87. </tr>
  88. <?php endif; ?>
  89. <tr>
  90. <td>Tags:</td>
  91. <td><?php echo tribe_meta_event_tags(); ?></td>
  92. </tr>
  93. </table>
  94. </div>
  95. <div class="col-lg-8">
  96. <div class="container">
  97.  
  98. <!-------->
  99. <div id="content">
  100. <ul id="tabs" class="nav nav-tabs" data-tabs="tabs">
  101. <li class="active"><a href="#red" data-toggle="tab">Event Description</a></li>
  102. <li><a href="#orange" data-toggle="tab">Event Comments</a></li>
  103. </ul>
  104. <div id="my-tab-content" class="tab-content">
  105. <div class="tab-pane active" id="red">
  106. <p>
  107. <?php the_content(); ?>
  108. </p>
  109. <hr />
  110. <?php if( tribe_embed_google_map( get_the_ID() ) ) : ?>
  111. <?php if( tribe_address_exists( get_the_ID() ) ) tribe_the_embedded_map(); ?>
  112. <?php endif; ?>
  113. </div>
  114. <div class="tab-pane" id="orange">
  115. <?php if( get_post_type() == TribeEvents::POSTTYPE && tribe_get_option( 'showComments','no' ) == 'yes' ) { comments_template(); } ?>
  116. </div>
  117. </div>
  118. </div>
  119. </div>
  120. </div>
  121. <?php endwhile; ?>
  122.  
  123. <!-- END BOOTSTRAP LAYOUT -->
  124.  
  125. <script type="text/javascript">
  126. jQuery(document).ready(function ($) {
  127. $('#tabs').tab();
  128. });
  129. </script>
  130. </div>
  131. <!-- container -->
Advertisement
Add Comment
Please, Sign In to add comment