-
Notifications
You must be signed in to change notification settings - Fork 0
/
search.php
84 lines (84 loc) · 2.96 KB
/
search.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
<?php
/**
* The search template page
*
* @author : Alena Studio
*/
global $wp_query, $wp_rewrite;
get_header();
?>
<!-- Content
======================================================================== -->
<?php
$full_col = '';
$last_col = '';
$cont_col = '';
if (as_option('as_blog_position_sidebar') == "left") {
$last_col = ' dslc-last-col';
$cont_col = ' as-sidebar-border-right';
}
if (as_option('as_blog_position_sidebar') == "right") {
$cont_col = ' as-sidebar-border-left';
}
if (as_option('as_blog_position_sidebar') == "fullwidth") {
$full_col = ' dslc-12-col dslc-last-col';
}
else {
$full_col = ' dslc-8-col';
}
?>
<div class="as-page-wrapper">
<div class="as-content-wrapper">
<div id="as-page-blog-classic" class="as-wrapper clearfix <?php echo esc_attr($cont_col); ?>">
<?php
if (as_option('as_blog_position_sidebar') == "left") {
?>
<div class="dslc-col dslc-4-col">
<?php get_sidebar(); ?>
</div><!-- Sidebar / End -->
<?php } ?>
<div class="dslc-col <?php echo esc_attr($full_col); ?> <?php echo esc_attr($last_col); ?>">
<?php
if (have_posts()):
while (have_posts()): the_post();
$format = get_post_format();
?>
<div <?php post_class('as-post-item'); ?>>
<?php get_template_part('template/date', 'format'); ?>
<?php get_template_part('template/title', 'meta'); ?>
<?php get_template_part('template/content', $format); ?>
<?php
if ($format != 'quote') {
get_template_part('template/blog', 'detail');
}
?>
</div>
<div class="clearfix"></div>
<?php
endwhile;
else:
?>
<div class="search-error">
<p style="font-size:30px;"><?php esc_html_e('Sorry there are no posts to display, oh man!', 'alenastudio') ?></p>
</div>
<?php endif; ?>
<!-- Pagination -->
<div class="as-pagination-wrapper">
<?php echo as_get_pagination(); ?>
</div>
<!-- Pagination / End -->
<?php wp_reset_postdata(); ?>
</div><!-- Post Loop / End -->
<?php
if (as_option('as_blog_position_sidebar') == "right") {
?>
<div class="dslc-col dslc-4-col dslc-last-col">
<?php get_sidebar(); ?>
</div><!-- Sidebar / End -->
<?php } ?>
</div><!-- Wrapper / End -->
</div>
</div>
<!-- Content / End -->
<?php
get_footer();