Guest User

Untitled

a guest
Aug 5th, 2014
286
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 3.64 KB | None | 0 0
  1. <?php
  2. /**
  3.  * List View Single Event
  4.  * This file contains one event in the list view
  5.  *
  6.  * Override this template in your own theme by creating a file at [your-theme]/tribe-events/list/single-event.php
  7.  *
  8.  * @package TribeEventsCalendar
  9.  * @since  3.0
  10.  * @author Modern Tribe Inc.
  11.  *
  12.  */
  13.  
  14. if ( !defined('ABSPATH') ) { die('-1'); } ?>
  15. <?php
  16.  
  17. // Setup an array of venue details for use later in the template
  18. $venue_details = array();
  19.  
  20. if ($venue_name = tribe_get_meta( 'tribe_event_venue_name' ) ) {
  21.     $venue_details[] = $venue_name;
  22. }
  23.  
  24. if ($venue_address = tribe_get_meta( 'tribe_event_venue_address' ) ) {
  25.     $venue_details[] = $venue_address; 
  26. }
  27. // Venue microformats
  28. $has_venue_address = ( $venue_address ) ? ' location': '';
  29.  
  30. // Organizer
  31. $organizer = tribe_get_organizer();
  32.  
  33. ?>
  34.  
  35. <!-- Event Title -->
  36. <?php do_action( 'tribe_events_before_the_event_title' ) ?>
  37.  
  38. <div class="list-view">
  39.   <div class="row">
  40.     <div class="col-xs-12 col-sm-12 col-md-3 col-lg-4">
  41.       <!-- Event Image -->
  42.      
  43.       <div class="thumbnail"> <?php echo tribe_event_featured_image( null, 'thumbnail', array('class' => 'img-responsive')) ?>
  44.         <div class="clearfix"></div>
  45.         <div class="caption text-center"> <a href="<?php echo tribe_get_event_link() ?>" class="tribe-events-read-more visible-xs" rel="bookmark">
  46.           <button class="btn btn-primary btn-block">More Info / Tickets</button>
  47.           </a>
  48.           <h3 class="hidden-xs"><?php echo tribe_get_venue() ?></h3>
  49.           <p class="hidden-xs"><?php echo tribe_get_full_address() ?></p>
  50.           <p class="hidden-xs">This event is presented by:<br />
  51.             <?php echo tribe_get_organizer_link (); ?></p>
  52.         </div>
  53.       </div>
  54.     </div>
  55.    
  56.     <!-- Event Content -->
  57.     <?php do_action( 'tribe_events_before_the_content' ) ?>
  58.     <div class="hidden-xs col-sm-12 col-md-p col-lg-8">
  59.       <div class="page-header"> <a class="url" href="<?php echo tribe_get_event_link() ?>" title="<?php the_title() ?>" rel="bookmark">
  60.         <h3>
  61.           <?php the_title() ?>
  62.         </h3>
  63.         </a> </div>
  64.       <div class="panel panel-default">
  65.         <div class="panel-heading"> <span class="btn-group">
  66.           <h5> <?php echo tribe_events_event_schedule_details() ?> </h5>
  67.           </span>
  68.           <?php if ( tribe_get_cost() ) : ?>
  69.           <span class="btn-group pull-right"> <a href="<?php echo esc_url( tribe_get_custom_field( 'Tickets' ) ) ?>" target="_blank">
  70.           <button class="btn btn-default"> <?php echo tribe_get_cost( null, true ); ?> </button>
  71.           </a> </span>
  72.           <div class="clearfix"></div>
  73.           <?php endif; ?>
  74.         </div>
  75.         <div class="panel-body">
  76.           <?php the_excerpt() ?>
  77.         </div>
  78.         <div class="panel-footer"> <a href="<?php echo tribe_get_map_link(); ?>" target="_blank">
  79.           <button class="btn btn-primary pull-left">Map It</button>
  80.           </a>
  81.           <?php if ( ! $event_passed ): ?>
  82.           <a href="<?php echo esc_url( tribe_get_custom_field( 'Tickets' ) ) ?>" target="_blank">
  83.           <button class="btn btn-primary pull-right buy-tickets">Buy Tickets</button>
  84.           </a>
  85.           <?php endif ?>
  86.           &nbsp; <a href="<?php echo tribe_get_event_link() ?>" class="tribe-events-read-more" rel="bookmark">
  87.           <button class="btn btn-primary pull-right">Find Out More</button>
  88.           </a>
  89.           <div class="clearfix"></div>
  90.         </div>
  91.       </div>
  92.     </div>
  93.     <!--/.col-->
  94.    
  95.     <!-- .tribe-events-list-event-description -->
  96.     <?php do_action( 'tribe_events_after_the_content' ) ?>
  97.   </div>
  98. </div>
  99. <hr class="hidden-xs" />
Advertisement
Add Comment
Please, Sign In to add comment