/
single-event.php
95 lines (80 loc) · 3.33 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
<?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();
$full_date_arr = get_post_meta( get_the_ID(), '_EventStartDate' );
$start_date = date('n/j/Y',strtotime ($full_date_arr[0]));
?>
<div id="tribe-events-content" class="tribe-events-single vevent hentry">
<!-- Notices -->
<?php tribe_events_the_notices() ?>
<?php while ( have_posts() ) : the_post(); ?>
<div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<!-- Not a real form -->
<div style="clear:both;"><a href="https://clients.mindbodyonline.com/classic/home?studioid=38100&classDate=<?php print_r($start_date); ?>&view=day" target="_blank"><input type="button" id="sign_up" value="Sign Up" style=" background-color:#C6CED9; font-size:1.3em; padding:6px 20px; margin: 0 0 6px"></a></div>
<?php if( has_post_thumbnail() ): ?>
<div class="fusion-events-featured-image">
<div class="hover-type-<?php echo Avada()->settings->get( 'ec_hover_type' ); ?>">
<!-- Event featured image, but exclude link -->
<?php echo tribe_event_featured_image( $event_id, 'full', false ); ?>
<?php Avada_EventsCalendar::render_single_event_title(); ?>
</div>
<?php else: ?>
<div class="fusion-events-featured-image fusion-events-single-title">
<?php Avada_EventsCalendar::render_single_event_title(); ?>
<?php endif; ?>
</div>
<!-- Event content -->
<!-- NOT REAL. JUST FOR DEMO -->
<div><a href="/classes-workshops_calendar" style="color:#444;font-size:.8em"> <- Back to Calendar </a></div>
<?php do_action( 'tribe_events_single_event_before_the_content' ) ?>
<div class="tribe-events-single-event-description tribe-events-content entry-content description">
<?php the_content(); ?>
</div>
<!-- .tribe-events-single-event-description -->
<?php do_action( 'tribe_events_single_event_after_the_content' ) ?>
</div> <!-- #post-x -->
<?php
if( class_exists( 'Tribe__Events__Pro__Main' ) && ! tribe_get_option( 'hideRelatedEvents', false ) ) {
tribe_get_template_part( 'pro/related-events' );
}
?>
<?php
if ( get_post_type() == Tribe__Events__Main::POSTTYPE && tribe_get_option( 'showComments', false ) ) {
add_filter( 'comments_template', 'add_comments_template' );
function add_comments_template() {
return get_template_directory() . '/comments.php';
}
comments_template();
}
?>
<?php endwhile;
?>
<!-- Event footer -->
<!--
<div id="tribe-events-footer">
<!-- Navigation -->
<!--
<h3 class="tribe-events-visuallyhidden"><?php printf( __( '%s Navigation', 'tribe-events-calendar' ), $events_label_singular ); ?></h3>
<ul class="tribe-events-sub-nav">
<li class="tribe-events-nav-previous"><?php tribe_the_prev_event_link( '%title%' ) ?></li>
<li class="tribe-events-nav-next"><?php tribe_the_next_event_link( '%title%' ) ?></li>
</ul>
<!-- .tribe-events-sub-nav -->
<!--
</div>
<!-- #tribe-events-footer -->
</div><!-- #tribe-events-content -->