-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathsearch.php
181 lines (167 loc) · 9.69 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
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
<?php get_header(); ?>
<?php
/*
template name: blog
*/
?>
<main>
<!-- Hero Area Start -->
<div class="hero-area hero-height2 d-flex align-items-center" data-background="<?php bloginfo('template_url'); ?>/img/hero/h2_hero.jpg">
<div class="container">
<div class="row">
<div class="col-xl-12">
<div class="hero-cap text-center pt-50">
<h2>Our Blog</h2>
</div>
</div>
</div>
</div>
</div>
<!-- Hero Area End -->
<!--================Blog Area =================-->
<section class="blog_area section-padding">
<div class="container">
<div class="row">
<div class="col-lg-8 mb-5 mb-lg-0">
<div class="blog_left_sidebar">
<?php
// Se houver resultados exibe o conteúdo, se não exibe um formuládio de buscas
if (is_search()) :
$total_results = $wp_query->found_posts;
echo "<h3 class='mb-3'>" . sprintf( __('%s resultado(s) para "%s"','BS 4 + WP'), $total_results, get_search_query()) . "</h3>";
endif;
?>
<?php if(have_posts()) : while(have_posts()) : the_post(); ?>
<article class="blog_item">
<div class="blog_item_img">
<?php the_post_thumbnail('post-thumbnail', array('class' => 'img-fluid rounded card-img rounded-0')); ?>
<a href="#" class="blog_item_date">
<h3><?php echo getdate()["mday"]?></h3>
<p><?php echo getdate()["month"]?></p>
</a>
</div>
<div class="blog_details">
<a class="d-inline-block" href="<?php the_permalink(); ?>">
<h2><?php the_title(); ?></h2>
</a>
<p><?php the_excerpt(); ?></p>
<ul class="blog-info-link">
<li><a href="#"><i class="fa fa-user"></i> Travel, Lifestyle</a></li>
<li><a href="#"><i class="fa fa-comments"></i> 03 Comments</a></li>
</ul>
</div>
</article>
<?php endwhile; endif;?>
<!--
<article class="blog_item">
<div class="blog_item_img">
<img class="card-img rounded-0" src="assets/img/blog/single_blog_2.png" alt="">
<a href="#" class="blog_item_date">
<h3>15</h3>
<p>Jan</p>
</a>
</div>
<div class="blog_details">
<a class="d-inline-block" href="single-blog.html">
<h2>Google inks pact for new 35-storey office</h2>
</a>
<p>That dominion stars lights dominion divide years for fourth have don't stars is that
he earth it first without heaven in place seed it second morning saying.</p>
<ul class="blog-info-link">
<li><a href="#"><i class="fa fa-user"></i> Travel, Lifestyle</a></li>
<li><a href="#"><i class="fa fa-comments"></i> 03 Comments</a></li>
</ul>
</div>
</article>
<article class="blog_item">
<div class="blog_item_img">
<img class="card-img rounded-0" src="assets/img/blog/single_blog_3.png" alt="">
<a href="#" class="blog_item_date">
<h3>15</h3>
<p>Jan</p>
</a>
</div>
<div class="blog_details">
<a class="d-inline-block" href="single-blog.html">
<h2>Google inks pact for new 35-storey office</h2>
</a>
<p>That dominion stars lights dominion divide years for fourth have don't stars is that
he earth it first without heaven in place seed it second morning saying.</p>
<ul class="blog-info-link">
<li><a href="#"><i class="fa fa-user"></i> Travel, Lifestyle</a></li>
<li><a href="#"><i class="fa fa-comments"></i> 03 Comments</a></li>
</ul>
</div>
</article>
<article class="blog_item">
<div class="blog_item_img">
<img class="card-img rounded-0" src="assets/img/blog/single_blog_4.png" alt="">
<a href="#" class="blog_item_date">
<h3>15</h3>
<p>Jan</p>
</a>
</div>
<div class="blog_details">
<a class="d-inline-block" href="single-blog.html">
<h2>Google inks pact for new 35-storey office</h2>
</a>
<p>That dominion stars lights dominion divide years for fourth have don't stars is that
he earth it first without heaven in place seed it second morning saying.</p>
<ul class="blog-info-link">
<li><a href="#"><i class="fa fa-user"></i> Travel, Lifestyle</a></li>
<li><a href="#"><i class="fa fa-comments"></i> 03 Comments</a></li>
</ul>
</div>
</article>
<article class="blog_item">
<div class="blog_item_img">
<img class="card-img rounded-0" src="assets/img/blog/single_blog_5.png" alt="">
<a href="#" class="blog_item_date">
<h3>15</h3>
<p>Jan</p>
</a>
</div>
<div class="blog_details">
<a class="d-inline-block" href="single-blog.html">
<h2>Google inks pact for new 35-storey office</h2>
</a>
<p>That dominion stars lights dominion divide years for fourth have don't stars is that
he earth it first without heaven in place seed it second morning saying.</p>
<ul class="blog-info-link">
<li><a href="#"><i class="fa fa-user"></i> Travel, Lifestyle</a></li>
<li><a href="#"><i class="fa fa-comments"></i> 03 Comments</a></li>
</ul>
</div>
</article>
-->
<nav class="blog-pagination justify-content-center d-flex">
<ul class="pagination">
<li class="page-item">
<a href="#" class="page-link" aria-label="Previous">
<i class="ti-angle-left"></i>
</a>
</li>
<li class="page-item">
<a href="#" class="page-link">1</a>
</li>
<li class="page-item active">
<a href="#" class="page-link">2</a>
</li>
<li class="page-item">
<a href="#" class="page-link" aria-label="Next">
<i class="ti-angle-right"></i>
</a>
</li>
</ul>
</nav>
</div>
</div>
<?php get_sidebar();?>
</div>
</div>
</div>
</div>
</section>
<!--================Blog Area =================-->
</main>
<?php get_footer();?>