-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcontent-event.php
101 lines (85 loc) · 3.5 KB
/
content-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
<?php
/**
* The default template for displaying event content
*
* @package WordPress
* @subpackage UNHYPED
*/
?>
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<header class="entry-header">
<?php if ( ! is_singular() ) : // do not make the title and thumbnail a link if post is singular ?>
<a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( 'Permalink to %s', 'synack' ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark">
<?php endif; ?>
<?php if ( !is_home() ) : // print title above thumbnail when not on the home page ?>
<?php the_title('<h1 class="entry-title">', '</h1>'); ?>
<?php endif; // !is_home() ?>
<?php if ( has_post_thumbnail() ) : // check if the post has a Post Thumbnail assigned to it. ?>
<figure class="post-thumbnail">
<?php
if ( is_home() ):
the_post_thumbnail('thumbnail');
else:
the_post_thumbnail('large');
endif;
?>
</figure>
<?php endif; // has_post_thumbnail() ?>
<?php if ( is_home() ) : // print title below thumbnail on home page ?>
<?php the_title('<h1 class="entry-title">', '</h1>'); ?>
<?php endif; // is_home() ?>
<?php if ( !is_singular() ) : // close title and thumbnail link ?>
</a>
<?php endif; //!is_singular() ?>
<?php
// Print the meta info on the home page
if (is_home()):
// The date strings
if ( eo_get_the_start('Y-m-d') == date('Y-m-d') ):
$datestr = __('Today', 'unhyped');
elseif ( eo_get_the_start('Y-m-d') == date('Y-m-d', time()+86400) ):
$datestr = __('Tomorrow', 'unhyped');
else:
$datestr = eo_get_the_start('Y-m-d');
endif;
// The venue strings
$venue = eo_get_venue_name();
$address = eo_get_venue_address();
echo '<p class="entry-meta"><span class="date">'.$datestr.'</span>';
if (!empty($venue)) echo ' at <span class="location">'.$venue.'</span>';
if (!empty($address['address']) && !empty($address['postcode'])) echo ' <a class="address" href="http://maps.google.com/maps?q='.urlencode($address['address'].' '.$address['postcode']).'">'.$address['address'].'</a>';
endif; // is_home()
?>
</header><!-- .entry-header -->
<div class="entry-content">
<?php
if ( is_singular() ) :
the_content( __( 'Continue reading <span class="meta-nav">→</span>', 'synack' ) );
else :
the_pretty_excerpt();
endif;
?>
</div><!-- .entry-content -->
<?php if ( 'post' == get_post_type() && is_singular() ) : ?>
<footer class="entry-footer">
<?php
$categories_list = get_the_category_list( '</li><li>' );
if ( $categories_list ):
?>
<ul class="inline-list cat-links">
<h2 class="assistive-text"><?php _e('Categories', 'synack'); ?></h2>
<li><?php echo $categories_list; ?></li>
</ul>
<?php endif; // End if categories ?>
<?php
$tags_list = get_the_tag_list( '', '</li><li>' );
if ( $tags_list ):
?>
<ul class="inline-list tag-links">
<h2 class="assistive-text"><?php _e('Tags', 'synack'); ?></h2>
<li><?php echo $tags_list; ?></li>
</ul>
<?php endif; // End if $tags_list ?>
</footer><!-- #entry-footer -->
<?php endif; // End if 'post' == get_post_type() && is_singular() ?>
</article><!-- #post-<?php the_ID(); ?> -->