-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcategory_default.php
More file actions
263 lines (234 loc) · 10.1 KB
/
Copy pathcategory_default.php
File metadata and controls
263 lines (234 loc) · 10.1 KB
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
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
<!-- main content start -->
<div class="mainwrap blog <?php if(is_front_page()) echo 'home' ?> <?php if(!everly_globals('use_fullwidth')) echo 'sidebar' ?> default">
<div class="main clearfix">
<div class="pad"></div>
<div class="content blog">
<?php if (have_posts()) : ?>
<?php
add_filter( 'shortcode_atts_gallery', 'everly_gallery' );
function everly_gallery( $out )
{
remove_filter( current_filter(), __FUNCTION__ );
$out['size'] = 'everly-news';
return $out;
}
?>
<?php while (have_posts()) : the_post(); ?>
<?php if(is_sticky(get_the_id())) { ?>
<div class="everly_sticky">
<?php } ?>
<?php
$postmeta = get_post_custom(get_the_id()); ?>
<?php
if ( has_post_format( 'gallery' , get_the_id())) {
?>
<div class="slider-category">
<div class="blogpostcategory">
<div class="topBlog">
<div class="blog-category"><?php echo '<em>' . get_the_category_list( esc_html__( ', ', 'everly-lite' ) ) . '</em>'; ?> </div>
<h2 class="title"><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h2>
<?php if(everly_globals('display_post_meta')) { ?>
<div class = "post-meta">
<?php
$day = get_the_time('d');
$month= get_the_time('m');
$year= get_the_time('Y');
?>
<?php echo '<a class="post-meta-time" href="'.get_day_link( $year, $month, $day ).'">'; ?><?php the_time('F j, Y') ?></a> <a class="post-meta-author" href="<?php echo the_author_meta( 'user_url' ) ?>"><?php esc_html_e('by ','everly-lite'); echo get_the_author(); ?></a> <a href="<?php echo the_permalink() ?>#commentform"><?php comments_number(); ?></a>
</div>
<?php } ?> <!-- end of post meta -->
</div>
<?php
$attachments = '';
$attachments = get_post_gallery_images( $post->ID);
if ($attachments) {?>
<div id="slider-category" class="slider-category">
<script type="text/javascript">
jQuery(document).ready(function($){
jQuery('.bxslider').bxSlider({
easing : 'easeInOutQuint',
captions: true,
speed: 800,
buildPager: function(slideIndex){
switch(slideIndex){
<?php
$i = 0;
foreach ($attachments as $image_url) {
echo 'case '.$i.':return "<img src=\"'. esc_url( $image_url) .'\"";';
$i++;
} ?>
}
}
});
});
</script>
<ul id="slider" class="bxslider">
<?php
foreach ($attachments as $image_url) {
?>
<li>
<img src="<?php echo esc_url( $image_url) ?>" alt="<?php ?>"/>
</li>
<?php } ?>
</ul>
</div>
<?php } ?>
<?php get_template_part('includes/boxes/loopBlog','single'); ?>
</div>
</div>
<?php }
if ( has_post_format( 'video' , get_the_id())) { ?>
<div class="slider-category">
<div class="blogpostcategory">
<div class="topBlog">
<div class="blog-category"><?php echo '<em>' . get_the_category_list( esc_html__( ', ', 'everly-lite' ) ) . '</em>'; ?> </div>
<h2 class="title"><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h2>
<?php if(everly_globals('display_post_meta')) { ?>
<div class = "post-meta">
<?php
$day = get_the_time('d');
$month= get_the_time('m');
$year= get_the_time('Y');
?>
<?php echo '<a class="post-meta-time" href="'.get_day_link( $year, $month, $day ).'">'; ?><?php the_time('F j, Y') ?></a> <a class="post-meta-author" href="<?php echo the_author_meta( 'user_url' ) ?>"><?php esc_html_e('by ','everly-lite'); echo get_the_author(); ?></a> <a href="<?php echo the_permalink() ?>#commentform"><?php comments_number(); ?></a>
</div>
<?php } ?> <!-- end of post meta -->
</div>
<?php
if(!empty($postmeta["video_post_url"][0])) {
echo wp_oembed_get(esc_url($postmeta["video_post_url"][0]));
} ?>
<?php get_template_part('includes/boxes/loopBlog','single'); ?>
</div>
</div>
<?php }
if ( has_post_format( 'link' , get_the_id())) {
$postmeta = get_post_custom(get_the_id());
if(isset($postmeta["link_post_url"][0])){
$link = esc_url($postmeta["link_post_url"][0]);
} else {
$link = "#";
}
?>
<div class="link-category">
<div class="blogpostcategory">
<div class="topBlog">
<div class="blog-category"><?php echo '<em>' . get_the_category_list( esc_html__( ', ', 'everly-lite' ) ) . '</em>'; ?> </div>
<h2 class="title"><a href="<?php $link ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h2>
<?php if(everly_globals('display_post_meta')) { ?>
<div class = "post-meta">
<?php
$day = get_the_time('d');
$month= get_the_time('m');
$year= get_the_time('Y');
?>
<?php echo '<a class="post-meta-time" href="'.get_day_link( $year, $month, $day ).'">'; ?><?php the_time('F j, Y') ?></a> <a class="post-meta-author" href="<?php echo the_author_meta( 'user_url' ) ?>"><?php esc_html_e('by ','everly-lite'); echo get_the_author(); ?></a> <a href="<?php echo the_permalink() ?>#commentform"><?php comments_number(); ?></a>
</div>
<?php } ?> <!-- end of post meta -->
</div>
<?php if(everly_getImage(get_the_id(), 'everly-postBlock') != '') { ?>
<a class="overdefultlink" href="<?php echo esc_url($link) ?>">
<div class="overdefult">
</div>
</a>
<div class="blogimage">
<div class="loading"></div>
<a href="<?php echo esc_url($link) ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php echo everly_getImage(get_the_id(), 'everly-postBlock'); ?></a>
</div>
<?php } ?>
<?php get_template_part('includes/boxes/loopBlogLink','single'); ?>
</div>
</div>
<?php
}
if ( has_post_format( 'quote' , get_the_id())) {?>
<div class="quote-category">
<div class="blogpostcategory">
<?php get_template_part('includes/boxes/loopBlogQuote','single'); ?>
</div>
</div>
<?php
}
?>
<?php if ( has_post_format( 'audio' , get_the_id())) {?>
<div class="blogpostcategory">
<div class="topBlog">
<div class="blog-category"><?php echo '<em>' . get_the_category_list( esc_html__( ', ', 'everly-lite' ) ) . '</em>'; ?> </div>
<h2 class="title"><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h2>
<?php if(everly_globals('display_post_meta')) { ?>
<div class = "post-meta">
<?php
$day = get_the_time('d');
$month= get_the_time('m');
$year= get_the_time('Y');
?>
<?php echo '<a class="post-meta-time" href="'.get_day_link( $year, $month, $day ).'">'; ?><?php the_time('F j, Y') ?></a> <a class="post-meta-author" href="<?php echo the_author_meta( 'user_url' ) ?>"><?php esc_html_e('by ','everly-lite'); echo get_the_author(); ?></a> <a href="<?php echo the_permalink() ?>#commentform"><?php comments_number(); ?></a>
</div>
<?php } ?> <!-- end of post meta -->
</div>
<div class="audioPlayerWrap">
<div class="audioPlayer">
<?php
if(isset($postmeta["audio_post_url"][0]))
echo do_shortcode('[soundcloud params="auto_play=false&hide_related=false&visual=true" width="100%" height="150"]'. esc_url($postmeta["audio_post_url"][0]) .'[/soundcloud]') ?>
</div>
</div>
<?php get_template_part('includes/boxes/loopBlog','single'); ?>
</div>
<?php
}
?>
<?php if ( !get_post_format() ) {?>
<div class="blogpostcategory">
<div class="topBlog">
<div class="blog-category"><?php echo '<em>' . get_the_category_list( esc_html__( ', ', 'everly-lite' ) ) . '</em>'; ?> </div>
<h2 class="title"><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h2>
<?php if(everly_globals('display_post_meta')) { ?>
<div class = "post-meta">
<?php
$day = get_the_time('d');
$month= get_the_time('m');
$year= get_the_time('Y');
?>
<?php echo '<a class="post-meta-time" href="'.get_day_link( $year, $month, $day ).'">'; ?><?php the_time('F j, Y') ?></a> <a class="post-meta-author" href="<?php echo the_author_meta( 'user_url' ) ?>"><?php esc_html_e('by ','everly-lite'); echo get_the_author(); ?></a> <a href="<?php echo the_permalink() ?>#commentform"><?php comments_number(); ?></a>
</div>
<?php } ?> <!-- end of post meta -->
</div>
<?php if(everly_getImage(get_the_id(), 'everly-postBlock') != '') { ?>
<a class="overdefultlink" href="<?php the_permalink() ?>">
<div class="overdefult">
</div>
</a>
<div class="blogimage">
<div class="loading"></div>
<a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php echo everly_getImage(get_the_id(), 'everly-postBlock'); ?></a>
</div>
<?php } ?>
<?php get_template_part('includes/boxes/loopBlog','single'); ?>
</div>
<?php } ?>
<?php if(is_sticky()) { ?>
</div>
<?php } ?>
<?php endwhile; ?>
<?php
get_template_part('includes/wp-pagenavi','navigation');
if(function_exists('everly_wp_pagenavi')) { everly_wp_pagenavi(); }
?>
<?php else : ?>
<div class="postcontent">
<h1><?php everly_security($everly_data['errorpagetitle']) ?></h1>
<div class="posttext">
<?php everly_security($everly_data['errorpage']) ?>
</div>
</div>
<?php endif; ?>
</div>
<!-- sidebar -->
<?php if(!everly_globals('use_fullwidth')) { ?>
<div class="sidebar">
<?php dynamic_sidebar( 'everly_sidebar' ); ?>
</div>
<?php } ?>
</div>
</div>