/
single-event.php
108 lines (93 loc) · 4.09 KB
/
single-event.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
<?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
*
*/
if ( ! defined( 'ABSPATH' ) ) {
die( '-1' );
}
$events_label_singular = tribe_get_event_label_singular();
$events_label_plural = tribe_get_event_label_plural();
$event_id = get_the_ID();
?>
<div id="tribe-events-content" class="tribe-events-single">
<p class="tribe-events-back">
<a href="<?php echo esc_url( tribe_get_events_link() ); ?>"> <?php printf( '« ' . esc_html__( 'All %s', 'the-events-calendar' ), $events_label_plural ); ?></a>
</p>
<!-- Notices -->
<?php tribe_the_notices() ?>
<?php the_title( '<h1 class="tribe-events-single-event-title summary entry-title">', '</h1>' ); ?>
<div class="tribe-events-schedule tribe-clearfix">
<?php echo tribe_events_event_schedule_details( $event_id, '<h2>', '</h2>' ); ?>
<?php if ( tribe_get_cost() ) : ?>
<span class="tribe-events-divider">|</span>
<span class="tribe-events-cost"><?php echo tribe_get_cost( null, true ) ?></span>
<?php endif; ?>
<?php $price2 = get_field("additional_pricing_info");
if( $price2 ) { ?>
<span class="tribe-events-cost">
<?php echo $price2; ?>
</span>
<?php } ?>
</div>
<div class="vcard adr location">
<?php if ( tribe_get_venue() != '' ): ?>
<span class="fn org tribe-venue"><?php echo tribe_get_venue_link(); ?>, </span>
<?php endif ?>
<?php if ( tribe_get_city() != '' ): ?>
<span class="locality"><?php echo tribe_get_city(); ?>, </span>
<?php endif ?>
<?php if ( tribe_get_region() != '' ): ?>
<span class="region"><?php echo tribe_get_region(); ?>, </span>
<?php endif ?>
<?php if ( tribe_get_country() != '' ): ?>
<span class="country-name"><?php echo tribe_get_country(); ?></span>
<?php endif ?>
</div>
<!-- Event header -->
<div id="tribe-events-header" <?php tribe_events_the_header_attributes() ?>>
<!-- Navigation -->
<h3 class="tribe-events-visuallyhidden"><?php printf( esc_html__( '%s Navigation', 'the-events-calendar' ), $events_label_singular ); ?></h3>
<ul class="tribe-events-sub-nav">
<li class="tribe-events-nav-previous"><?php tribe_the_prev_event_link( '<span>«</span> %title%' ) ?></li>
<li class="tribe-events-nav-next"><?php tribe_the_next_event_link( '%title% <span>»</span>' ) ?></li>
</ul>
<!-- .tribe-events-sub-nav -->
</div>
<!-- #tribe-events-header -->
<?php while ( have_posts() ) : the_post(); ?>
<div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<!-- Event featured image, but exclude link -->
<?php echo tribe_event_featured_image( $event_id, 'event-featured', false ); ?>
<!-- Event content -->
<?php do_action( 'tribe_events_single_event_before_the_content' ) ?>
<div class="tribe-events-single-event-description tribe-events-content">
<?php the_content(); ?>
</div>
<!-- .tribe-events-single-event-description -->
<?php do_action( 'tribe_events_single_event_after_the_content' ) ?>
<!-- Event meta -->
<?php do_action( 'tribe_events_single_event_before_the_meta' ) ?>
<?php tribe_get_template_part( 'modules/meta' ); ?>
<?php do_action( 'tribe_events_single_event_after_the_meta' ) ?>
</div> <!-- #post-x -->
<?php if ( get_post_type() == Tribe__Events__Main::POSTTYPE && tribe_get_option( 'showComments', false ) ) comments_template() ?>
<?php endwhile; ?>
<!-- Event footer -->
<div id="tribe-events-footer">
<!-- Navigation -->
<h3 class="tribe-events-visuallyhidden"><?php printf( esc_html__( '%s Navigation', 'the-events-calendar' ), $events_label_singular ); ?></h3>
<ul class="tribe-events-sub-nav">
<li class="tribe-events-nav-previous"><?php tribe_the_prev_event_link( '<span>«</span> %title%' ) ?></li>
<li class="tribe-events-nav-next"><?php tribe_the_next_event_link( '%title% <span>»</span>' ) ?></li>
</ul>
<!-- .tribe-events-sub-nav -->
</div>
<!-- #tribe-events-footer -->
</div><!-- #tribe-events-content -->