1
|
<?php
|
2
|
/**
|
3
|
* Template Name: MESTC Events Page
|
4
|
*
|
5
|
* Special features include auto populating side calendar and upcoming event under each category
|
6
|
* …
|
7
|
* Based on page.php from THEMATIC Template
|
8
|
*
|
9
|
* @package MESTC
|
10
|
* @subpackage Templates
|
11
|
*/
|
12
|
|
13
|
// calling the header.php
|
14
|
get_header();
|
15
|
|
16
|
// action hook for placing content above #container
|
17
|
thematic_abovecontainer();
|
18
|
?>
|
19
|
|
20
|
<div id="container">
|
21
|
|
22
|
<?php
|
23
|
// action hook for placing content above #content
|
24
|
thematic_abovecontent();
|
25
|
|
26
|
// filter for manipulating the element that wraps the content
|
27
|
echo apply_filters( 'thematic_open_id_content', '<div id="content">' . "\n" );
|
28
|
|
29
|
// start the loop
|
30
|
while ( have_posts() ) : the_post();
|
31
|
|
32
|
// action hook for placing content above #post
|
33
|
thematic_abovepost();
|
34
|
?>
|
35
|
|
36
|
<?php
|
37
|
echo '<div id="post-' . get_the_ID() . '" ';
|
38
|
// Checking for defined constant to enable Thematic's post classes
|
39
|
if ( ! ( THEMATIC_COMPATIBLE_POST_CLASS ) ) {
|
40
|
post_class();
|
41
|
echo '>';
|
42
|
} else {
|
43
|
echo 'class="';
|
44
|
thematic_post_class();
|
45
|
echo '">';
|
46
|
}
|
47
|
|
48
|
// creating the post header
|
49
|
thematic_postheader();
|
50
|
?>
|
51
|
|
52
|
<div class="entry-content">
|
53
|
|
54
|
<?php
|
55
|
|
56
|
the_content();
|
57
|
|
58
|
?>
|
59
|
|
60
|
<?php if(have_rows('event_category_listing')): ?>
|
61
|
<?php while (have_rows('event_category_listing')) : the_row();?>
|
62
|
<?php $catSlug = get_sub_field('event_category_selection'); ?>
|
63
|
<div class="event-block">
|
64
|
<div class="event-image-left"><a href="<?php echo get_site_url(); ?>/events-list/category/<?php echo $catSlug->slug; ?>/"><img src="<?php the_sub_field('event_image'); ?>" align="alignleft" width="175" height="115" title="US Theatre"/></a><br/><?php the_sub_field('image_caption'); ?></div>
|
65
|
|
66
|
<div class="event-text"><a style="color:<?php the_sub_field('title_color_hex_code'); ?>" class="<?php echo $catSlug->slug; ?>" href="<?php echo get_site_url(); ?>/events-list/category/<?php echo $catSlug->slug; ?>/"><?php the_sub_field('event_title'); ?></a></div>
|
67
|
<?php the_sub_field('event_description'); ?>
|
68
|
<?php $theSlug = $catSlug->slug; ?>
|
69
|
<?php return_upcoming_category_event($theSlug);?>
|
70
|
</div>
|
71
|
<?php endwhile;
|
72
|
else : endif; ?>
|
73
|
|
74
|
|
75
|
<?php
|
76
|
|
77
|
wp_link_pages( "\t\t\t\t\t<div class='page-link'>" . __( 'Pages: ', 'thematic' ), "</div>\n", 'number' );
|
78
|
|
79
|
edit_post_link( __( 'Edit', 'thematic' ), "\n\t\t\t\t\t\t" . '<span class="edit-link">' , '</span>' . "\n" );
|
80
|
?>
|
81
|
|
82
|
</div><!-- .entry-content -->
|
83
|
|
84
|
</div><!-- #post -->
|
85
|
|
86
|
<?php
|
87
|
// action hook for inserting content below #post
|
88
|
thematic_belowpost();
|
89
|
|
90
|
// action hook for calling the comments_template
|
91
|
thematic_comments_template();
|
92
|
|
93
|
// end loop
|
94
|
endwhile;
|
95
|
?>
|
96
|
|
97
|
</div><!-- #content -->
|
98
|
|
99
|
<?php
|
100
|
// action hook for placing content below #content
|
101
|
thematic_belowcontent();
|
102
|
?>
|
103
|
|
104
|
</div><!-- #container -->
|
105
|
|
106
|
<?php
|
107
|
// action hook for placing content below #container
|
108
|
thematic_belowcontainer();
|
109
|
|
110
|
// calling the standard sidebar
|
111
|
thematic_sidebar();
|
112
|
|
113
|
// calling footer.php
|
114
|
get_footer();
|
115
|
?>
|