-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathsingle-ev7l-event-category.php
163 lines (127 loc) · 5.71 KB
/
single-ev7l-event-category.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
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
<?php get_header(); ?>
<section class="content">
<?php /* end of vanilla hueman archive.php v3.2.9 */ ?>
<div class="page-title pad group">
<h2>Rubrik - <?php the_title(); ?></h2>
</div><!--/.page-title-->
<?php /* continue vanilla hueman archive.php v3.2.9 */ ?>
<?php /* removed from vanilla hueman archive.php v3.2.9
<?php hu_get_template_part('parts/page-title'); ?>
*/ ?>
<div class="pad group">
<?php while ( have_posts() ): the_post(); ?>
<article <?php post_class(); ?>>
<?php /* end of vanilla hueman archive.php v3.2.9 */ ?>
<?php /* if (the_content(); not empty ... */ ?>
<?php get_template_part('parts/page-image'); ?>
<?php the_content(); ?>
<div class="clear"></div>
<div class="hr"></div>
<div class="upcoming-events">
<?php
$events = upcoming_events_in_category($post->ID);
if ( $events->have_posts() ) {
?>
<ul>
<?php
// Loop vars to find month changes.
$monthyear = -1;
while ( $events->have_posts() ) {
$events->the_post();
$post_fy = date_i18n(__('F Y', 'hueman-7l-child'), get_post_meta($post->ID, 'fromdate', true));
if ($monthyear != $post_fy) {
$monthyear = $post_fy;
echo '</ul><h2>'.$monthyear.'</h2><ul class="category-events">';
}
get_template_part('parts/event_list_line');
}
echo "</ul>";
} else {
echo __("Keine entsprechenden Veranstaltungen in der Zukunft", "hueman-7l-child");
}
/* Restore original Post data */
wp_reset_postdata();
?>
</div><!-- .upcoming-events -->
<?php
$events = past_events_in_category($post->ID);
if ( $events->have_posts() ) {
?>
<div class="past-events">
<h2><?php echo __("Seminare in der Vergangenheit", "hueman-7l-child"); ?></h2>
<table>
<?php
// Loop vars to find month changes.
$monthyear = -1;
while ( $events->have_posts() ) {
$events->the_post();
if ($monthyear != date_i18n(__('F Y', 'hueman-7l-child'), get_post_meta($post->ID, 'fromdate', true))) {
$monthyear = date_i18n(__('F Y', 'hueman-7l-child'), get_post_meta($post->ID, 'fromdate', true));
echo "</table><h2 class='month-section'>".$monthyear."</h2><table>";
}
?>
<tr>
<td class="datecol">
<?php echo date_i18n(__('D d.m.Y', 'hueman-7l-child'), get_post_meta($post->ID, 'fromdate', true)); ?>
- <?php echo date_i18n(__('D d.m.Y', 'hueman-7l-child'), get_post_meta($post->ID, 'todate', true)); ?>
</td>
<td class="eventcol">
<a href="<?php the_permalink(); ?>"><?php the_title(); ?></a>
<?php /* the_excerpt(); */ ?>
</td>
</tr>
<?php }
?>
</table>
</div><!-- .past-events -->
<?php
}
// else: No upcoming events
/* Restore original Post data */
wp_reset_postdata();
?>
<?php /* pickup vanilla hueman archive.php v3.2.9 */ ?>
<?php /* vanilla hueman single.php v3.2.9:
<div class="post-inner group">
<?php hu_get_template_part('parts/single-heading'); ?>
<?php if( get_post_format() ) { get_template_part('parts/post-formats'); } ?>
<div class="clear"></div>
<div class="<?php echo implode( ' ', apply_filters( 'hu_single_entry_class', array('entry','themeform') ) ) ?>">
<div class="entry-inner">
<?php the_content(); ?>
<nav class="pagination group">
<?php
//Checks for and uses wp_pagenavi to display page navigation for multi-page posts.
if ( function_exists('wp_pagenavi') )
wp_pagenavi( array( 'type' => 'multipart' ) );
else
wp_link_pages(array('before'=>'<div class="post-pages">'.__('Pages:','hueman'),'after'=>'</div>'));
?>
</nav><!--/.pagination-->
</div>
<?php do_action( 'hu_after_single_entry_inner' ); ?>
<div class="clear"></div>
</div><!--/.entry-->
</div><!--/.post-inner-->
*/ ?>
</article><!--/.post-->
<?php endwhile; ?>
<div class="clear"></div>
<?php /* vanilla hueman single.php v3.2.9:
<?php the_tags('<p class="post-tags"><span>'.__('Tags:','hueman').'</span> ','','</p>'); ?>
<?php if ( ( hu_is_checked( 'author-bio' ) ) && get_the_author_meta( 'description' ) ): ?>
<div class="author-bio">
<div class="bio-avatar"><?php echo get_avatar(get_the_author_meta('user_email'),'128'); ?></div>
<p class="bio-name"><?php the_author_meta('display_name'); ?></p>
<p class="bio-desc"><?php the_author_meta('description'); ?></p>
<div class="clear"></div>
</div>
<?php endif; ?>
<?php if ( 'content' == hu_get_option( 'post-nav' ) ) { get_template_part('parts/post-nav'); } ?>
<?php if ( '1' != hu_get_option( 'related-posts' ) ) { get_template_part('parts/related-posts'); } ?>
<?php if ( hu_is_checked('post-comments') ) { comments_template('/comments.php',true); } ?>
*/ ?>
</div><!--/.pad-->
</section><!--/.content-->
<?php get_sidebar(); ?>
<?php get_footer(); ?>