Advertisement
Guest User

Untitled

a guest
Jan 23rd, 2023
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.45 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. * Fallback template only if plugin Tribe__Tickets_Plus is active. Function of this plugin is broken with our overridden version with mobile support
  12. * @since 4.2.7
  13. */
  14.  
  15. if ( ! defined( 'ABSPATH' ) ) { die('-1'); }
  16.  
  17. $event_id = get_the_ID();
  18.  
  19. ?>
  20.  
  21. <div id="tribe-events-content" class="tribe-events-single">
  22.  
  23. <p class="tribe-events-back"><a href="<?php echo tribe_get_events_link() ?>"> <?php _e( '&laquo; All Events', 'avia_framework' ) ?></a></p>
  24.  
  25. <!-- Notices -->
  26. <?php
  27. if( function_exists( 'tribe_the_notices' ) )
  28. {
  29. tribe_the_notices();
  30. }
  31. else
  32. {
  33. tribe_events_the_notices();
  34. }
  35. ?>
  36.  
  37.  
  38. <?php while ( have_posts() ) : the_post();
  39.  
  40. $default_heading = 'h2';
  41. $args = array(
  42. 'heading' => $default_heading,
  43. 'extra_class' => ''
  44. );
  45.  
  46. /**
  47. * @since 4.5.5
  48. * @return array
  49. */
  50. $args = apply_filters( 'avf_customize_heading_settings', $args, 'single-event-no-mobile', array() );
  51.  
  52. $heading = ! empty( $args['heading'] ) ? $args['heading'] : $default_heading;
  53. $css = ! empty( $args['extra_class'] ) ? $args['extra_class'] : '';
  54.  
  55. ?>
  56. <div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
  57. <!-- Event featured image, but exclude link -->
  58.  
  59. <div class='av-single-event-content'>
  60.  
  61. <?php the_title( "<{$heading} class='tribe-events-single-event-title summary entry-title {$css}'>", "</{$heading}>" ); ?>
  62.  
  63. <div class="tribe-events-schedule updated published tribe-clearfix">
  64. <?php echo tribe_events_event_schedule_details( $event_id, '<h3>', '</h3>' ); ?>
  65. <?php if ( tribe_get_cost() ) : ?>
  66. <span class="tribe-events-divider">-</span>
  67. <span class="tribe-events-cost"><?php echo tribe_get_cost( null, true ) ?></span>
  68. <?php endif; ?>
  69. </div>
  70.  
  71. <!-- Event content -->
  72. <?php do_action( 'tribe_events_single_event_before_the_content' ) ?>
  73. <div class="tribe-events-single-event-description tribe-events-content entry-content description">
  74. <?php echo tribe_event_featured_image( $event_id, 'entry_with_sidebar', false ); ?>
  75. <?php the_content(); ?>
  76. </div><!-- .tribe-events-single-event-description -->
  77.  
  78.  
  79.  
  80. <?php do_action( 'tribe_events_single_event_after_the_content' ) ?>
  81.  
  82. <?php
  83. if( get_post_type() == Tribe__Events__Main::POSTTYPE && tribe_get_option( 'showComments', false ) )
  84. {
  85. comments_template();
  86. }
  87. ?>
  88.  
  89. </div> <!-- av-single-event-content -->
  90.  
  91. <div class='av-single-event-meta-bar av-single-event-meta-bar-desktop'>
  92.  
  93. <div class='av-single-event-meta-bar-inner'>
  94.  
  95. <!-- Event meta -->
  96. <?php do_action( 'tribe_events_single_event_before_the_meta' ) ?>
  97. <?php
  98. /**
  99. * The tribe_events_single_event_meta() function has been deprecated and has been
  100. * left in place only to help customers with existing meta factory customizations
  101. * to transition: if you are one of those users, please review the new meta templates
  102. * and make the switch!
  103. *
  104. * Function was removed in version 3.11 on 22.7.2015
  105. *
  106. * To allow a more logical order of content on mobile/desktop we add 2 copies of the meta data
  107. * and show/hide with CSS
  108. */
  109. if ( ! apply_filters( 'tribe_events_single_event_meta_legacy_mode', false ) )
  110. {
  111. tribe_get_template_part( 'modules/meta' );
  112. }
  113. else
  114. {
  115. echo tribe_events_single_event_meta();
  116. }
  117. ?>
  118. <?php do_action( 'tribe_events_single_event_after_the_meta' ) ?>
  119.  
  120. </div>
  121. </div>
  122.  
  123.  
  124. </div> <!-- #post-x -->
  125.  
  126. <?php endwhile; ?>
  127.  
  128. <!-- Event footer -->
  129. <div id="tribe-events-footer">
  130. <!-- Navigation -->
  131. <!-- Navigation -->
  132. <h3 class="tribe-events-visuallyhidden"><?php _e( 'Event Navigation', 'avia_framework' ) ?></h3>
  133. <ul class="tribe-events-sub-nav">
  134. <li class="tribe-events-nav-previous"><?php tribe_the_prev_event_link( '<span>&laquo;</span> %title%' ) ?></li>
  135. <li class="tribe-events-nav-next"><?php tribe_the_next_event_link( '%title% <span>&raquo;</span>' ) ?></li>
  136. </ul><!-- .tribe-events-sub-nav -->
  137. </div><!-- #tribe-events-footer -->
  138.  
  139. </div><!-- #tribe-events-content -->
  140.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement