View difference between Paste ID: FLdsE60d and czdMKBwH
SHOW: | | - or go back to the newest paste.
1
<?php
2
/**
3
* The Child Theme template for displaying all single posts.
4
*
5-
<?php get_header(); ?>
5+
6
7
get_header(); ?>
8
9
<div class="wrapper section-inner">
10
11
	<div class="content left">
12
13
		<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
14
15
			<div class="posts">
16
17
				<div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
18
19
					<div class="post-header">
20
21
						<?php if ( has_post_thumbnail() ) : ?>
22
23
							<div class="featured-media">
24
25
								<a href="<?php the_permalink(); ?>" rel="bookmark" title="<?php the_title(); ?>">
26
27
									<?php the_post_thumbnail('post-image'); ?>
28
29
									<?php if ( !empty(get_post(get_post_thumbnail_id())->post_excerpt) ) : ?>
30
31
										<div class="media-caption-container">
32
33
											<p class="media-caption"><?php echo get_post(get_post_thumbnail_id())->post_excerpt; ?></p>
34
35
										</div>
36
37
									<?php endif; ?>
38
39
								</a>
40
41
							</div> <!-- /featured-media -->
42
43
						<?php endif; ?>
44
45
						<?php $videourl = get_post_meta($post->ID, 'videourl', true); if ( $videourl != '' ) : ?>
46
47
							<div class="featured-media">
48
49
								<?php if (strpos($videourl,'.mp4') !== false) : ?>
50
51
									<video controls>
52
									  <source src="<?php echo $videourl; ?>" type="video/mp4">
53
									</video>
54
55
								<?php else : ?>
56
57
									<?php
58
59
										$embed_code = wp_oembed_get($videourl);
60
61
										echo $embed_code;
62
63
									?>
64
65
								<?php endif; ?>
66
67
							</div> <!-- /featured-media -->
68
69
						<?php endif; ?>
70
71
					    <h1 class="post-title"><a href="<?php the_permalink(); ?>" rel="bookmark" title="<?php the_title(); ?>"><?php the_title(); ?></a></h1>
72
73
					    <div class="post-meta">
74
75
							<span class="post-date"><a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"><?php the_time(get_option('date_format')); ?></a></span>
76
77
							<span class="date-sep"> / </span>
78
79
							<span class="post-author"><?php the_author_posts_link(); ?></span>
80
81
							<span class="date-sep"> / </span>
82
83
							<?php comments_popup_link( '<span class="comment">' . __( '0 Comments', 'hemingway' ) . '</span>', __( '1 Comment', 'hemingway' ), __( '% Comments', 'hemingway' ) ); ?>
84
85
							<?php if ( current_user_can( 'manage_options' ) ) { ?>
86
87
								<span class="date-sep"> / </span>
88
89
								<?php edit_post_link(__('Edit', 'hemingway')); ?>
90
91
							<?php } ?>
92
93
						</div>
94
95
					</div> <!-- /post-header -->
96
97
					<div class="post-content">
98
99
						<?php the_content(); ?>
100
101
						<?php wp_link_pages(); ?>
102
103
					</div> <!-- /post-content -->
104
105
					<div class="clear"></div>
106
107
					<div class="post-meta-bottom">
108
109
						<p class="post-categories"><span class="category-icon"><span class="front-flap"></span></span> <?php the_category(', '); ?></p>
110
111
						<?php if( has_tag()) { ?><p class="post-tags"><?php the_tags('', ''); ?></p><?php } ?>
112
113
						<div class="clear"></div>
114
115
						<div class="post-nav">
116
117
							<?php
118
							$prev_post = get_previous_post();
119
							if (!empty( $prev_post )): ?>
120
121
								<a class="post-nav-older" title="<?php _e('Previous post:', 'hemingway'); echo ' ' . get_the_title($prev_post); ?>" href="<?php echo get_permalink( $prev_post->ID ); ?>">
122
123
								<h5><?php _e('Previous post', 'hemingway'); ?></h5>
124
								<?php echo get_the_title($prev_post); ?>
125
126
								</a>
127
128
							<?php endif; ?>
129
130
							<?php
131
							$next_post = get_next_post();
132
							if (!empty( $next_post )): ?>
133
134
								<a class="post-nav-newer" title="<?php _e('Next post:', 'hemingway'); echo ' ' . get_the_title($next_post); ?>" href="<?php echo get_permalink( $next_post->ID ); ?>">
135
136
								<h5><?php _e('Next post', 'hemingway'); ?></h5>
137
								<?php echo get_the_title($next_post); ?>
138
139
								</a>
140
141
							<?php endif; ?>
142
143
							<div class="clear"></div>
144
145
						</div> <!-- /post-nav -->
146
147
					</div> <!-- /post-meta-bottom -->
148
149
					<?php comments_template( '', true ); ?>
150
151
			   	<?php endwhile; else: ?>
152
153
					<p><?php _e("We couldn't find any posts that matched your query. Please try again.", "hemingway"); ?></p>
154
155
				<?php endif; ?>
156
157
			</div> <!-- /post -->
158
159
		</div> <!-- /posts -->
160
161
	</div> <!-- /content -->
162
163
	<?php get_sidebar(); ?>
164
165
	<div class="clear"></div>
166
167
</div> <!-- /wrapper -->
168
169
<?php get_footer(); ?>