Advertisement
Guest User

Untitled

a guest
Feb 5th, 2016
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.14 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. *
  11. */
  12.  
  13. if ( ! defined( 'ABSPATH' ) ) {
  14. die( '-1' );
  15. }
  16.  
  17. $events_label_singular = tribe_get_event_label_singular();
  18. $events_label_plural = tribe_get_event_label_plural();
  19.  
  20. $event_id = get_the_ID();
  21.  
  22. ?>
  23.  
  24. <div id="tribe-events-content" class="tribe-events-single">
  25.  
  26. <p class="tribe-events-back">
  27. <a href="<?php echo esc_url( tribe_get_events_link() ); ?>"> <?php printf( '&laquo; ' . esc_html__( 'All %s', 'the-events-calendar' ), $events_label_plural ); ?></a>
  28. </p>
  29.  
  30. <!-- Notices -->
  31. <?php tribe_the_notices() ?>
  32.  
  33. <?php the_title( '<h1 class="tribe-events-single-event-title">', '</h1>' ); ?>
  34.  
  35. <div class="tribe-events-schedule tribe-clearfix">
  36. <?php echo tribe_events_event_schedule_details( $event_id, '<h2>', '</h2>' ); ?>
  37. <?php if ( tribe_get_cost() ) : ?>
  38. <span class="tribe-events-divider">|</span>
  39. <span class="tribe-events-cost"><?php echo tribe_get_cost( null, true ) ?></span>
  40. <?php endif; ?>
  41. </div>
  42.  
  43. <!-- Event header -->
  44. <div id="tribe-events-header" <?php tribe_events_the_header_attributes() ?>>
  45. <!-- Navigation -->
  46. <h3 class="tribe-events-visuallyhidden"><?php printf( esc_html__( '%s Navigation', 'the-events-calendar' ), $events_label_singular ); ?></h3>
  47.  
  48. <!-- .tribe-events-sub-nav -->
  49. </div>
  50. <!-- #tribe-events-header -->
  51.  
  52. <?php while ( have_posts() ) : the_post(); ?>
  53. <div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
  54. <!-- Event featured image, but exclude link -->
  55. <?php echo tribe_event_featured_image( $event_id, 'full', false ); ?>
  56.  
  57. <!-- Event content -->
  58. <?php do_action( 'tribe_events_single_event_before_the_content' ) ?>
  59. <div class="tribe-events-single-event-description tribe-events-content">
  60. <?php the_content(); ?>
  61. </div>
  62. <!-- .tribe-events-single-event-description -->
  63. <?php do_action( 'tribe_events_single_event_after_the_content' ) ?>
  64.  
  65. <!-- Event meta -->
  66. <?php do_action( 'tribe_events_single_event_before_the_meta' ) ?>
  67. <?php tribe_get_template_part( 'modules/meta' ); ?>
  68. <?php do_action( 'tribe_events_single_event_after_the_meta' ) ?>
  69. </div> <!-- #post-x -->
  70. <?php if ( get_post_type() == Tribe__Events__Main::POSTTYPE && tribe_get_option( 'showComments', false ) ) comments_template() ?>
  71. <?php endwhile; ?>
  72.  
  73. <!-- Event footer -->
  74. <div id="tribe-events-footer">
  75. <!-- Navigation -->
  76. <h3 class="tribe-events-visuallyhidden"><?php printf( esc_html__( '%s Navigation', 'the-events-calendar' ), $events_label_singular ); ?></h3>
  77. <ul class="tribe-events-sub-nav">
  78. <li class="tribe-events-nav-previous"><?php tribe_the_prev_event_link( '<span>&laquo;</span> %title%' ) ?></li>
  79. <li class="tribe-events-nav-next"><?php tribe_the_next_event_link( '%title% <span>&raquo;</span>' ) ?></li>
  80. </ul>
  81. <!-- .tribe-events-sub-nav -->
  82. </div>
  83. <!-- #tribe-events-footer -->
  84.  
  85. </div><!-- #tribe-events-content -->
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement