-
Notifications
You must be signed in to change notification settings - Fork 0
/
taxonomy-event-tag.php
executable file
·112 lines (91 loc) · 3.98 KB
/
taxonomy-event-tag.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
<?php
/**
* The template for displaying an event-tag page
*
***************** NOTICE: *****************
* Do not make changes to this file. Any changes made to this file
* will be overwritten if the plug-in is updated.
*
* To overwrite this template with your own, make a copy of it (with the same name)
* in your theme directory.
*
* WordPress will automatically prioritise the template in your theme directory.
***************** NOTICE: *****************
*
* @package Event Organiser (plug-in)
* @since 1.2.0
*/
//Call the template header
get_header(); ?>
<!-- This template follows the TwentyEleven theme-->
<section id="primary">
<div id="content" role="main">
<?php if ( have_posts() ) : ?>
<!---- Page header, display tag title-->
<header class="page-header">
<h1 class="page-title"><?php
printf( __( 'Event Tag Archivessas: %s', 'eventorganiser' ), '<span>' . single_cat_title( '', false ) . '</span>' );
?></h1>
<!---- If the tag has a description display it-->
<?php
$tag_description = category_description();
if ( ! empty( $tag_description ) )
echo apply_filters( 'category_archive_meta', '<div class="category-archive-meta">' . $tag_description . '</div>' );
?>
</header>
<!---- Navigate between pages-->
<!---- In TwentyEleven theme this is done by twentyeleven_content_nav-->
<?php
global $wp_query;
if ( $wp_query->max_num_pages > 1 ) : ?>
<nav id="nav-above">
<div class="nav-next events-nav-newer"><?php next_posts_link( __( 'Later events <span class="meta-nav">→</span>' , 'eventorganiser' ) ); ?></div>
<div class="nav-previous events-nav-newer"><?php previous_posts_link( __( ' <span class="meta-nav">←</span> Newer events', 'eventorganiser' ) ); ?></div>
</nav><!-- #nav-above -->
<?php endif; ?>
<?php /* Start the Loop */ ?>
<?php while ( have_posts() ) : the_post(); ?>
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<header class="entry-header">
<h1 class="entry-title"><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h1>
<div class="entry-meta">
<!-- Output the date of the occurrence-->
<?php if(eo_is_allday()):?>
<!-- Event is an all day event -->
<?php eo_the_start('d F Y'); ?>
<?php else: ?>
<!-- Event is not an all day event - display time -->
<?php eo_the_start('d F Y G:ia'); ?>
<?php endif; ?>
<!-- If the event has a venue saved, display this-->
<?php if(eo_get_venue_name()):?>
<?php _e('at','eventorganiser');?> <a href="<?php eo_venue_link();?>"><?php eo_venue_name();?></a>
<?php endif;?>
</div><!-- .entry-meta -->
</header><!-- .entry-header -->
</article><!-- #post-<?php the_ID(); ?> -->
<?php endwhile; ?><!----The Loop ends-->
<!---- Navigate between pages-->
<?php
if ( $wp_query->max_num_pages > 1 ) : ?>
<nav id="nav-below">
<div class="nav-next events-nav-newer"><?php next_posts_link( __( 'Later events <span class="meta-nav">→</span>' , 'eventorganiser' ) ); ?></div>
<div class="nav-previous events-nav-newer"><?php previous_posts_link( __( ' <span class="meta-nav">←</span> Newer events', 'eventorganiser' ) ); ?></div>
</nav><!-- #nav-below -->
<?php endif; ?>
<?php else : ?>
<!---- If there are no events -->
<article id="post-0" class="post no-results not-found">
<header class="entry-header">
<h1 class="entry-title"><?php _e( 'Nothing Found', 'eventorganiser' ); ?></h1>
</header><!-- .entry-header -->
<div class="entry-content">
<p><?php _e( 'Apologies, but no events were found for the requested tag. ', 'eventorganiser' ); ?></p>
</div><!-- .entry-content -->
</article><!-- #post-0 -->
<?php endif; ?>
</div><!-- #content -->
</section><!-- #primary -->
<!-- Call template sidebar and footer -->
<?php get_sidebar(); ?>
<?php get_footer(); ?>