-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsearch.php
42 lines (34 loc) · 1.52 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
<?php theme_include('header'); ?>
<div class="content-bg">
<div class="container">
<h1 class="search-results-title"><i class="fa fa-search"></i> You searched for: “<span><?php echo search_term(); ?></span>”</h1>
</div>
<?php if(has_search_results()): ?>
<ol class="search-results-items">
<?php $i = 0; while(search_results()): $i++; ?>
<li>
<article class="article-excerpt article-excerpt__search">
<div class="container">
<h2>
<a class="dark" href="<?php echo article_url(); ?>" title="<?php echo article_title(); ?>"><?php echo article_title(); ?></a>
</h2>
</div>
</article>
</li>
<?php endwhile; ?>
</ol>
<?php if(has_pagination()): ?>
<nav class="pagination container clearfix">
<?php echo search_prev('<i class="fa fa-chevron-circle-left"></i><span> older posts</span>', '<a><i class="fa fa-chevron-circle-left"></i><span> older posts</span></a>'); ?><?php echo search_next('<span>newer posts </span><i class="fa fa-chevron-circle-right"></i>', '<a><span>newer posts </span><i class="fa fa-chevron-circle-right"></i></a>'); ?>
</nav>
<?php endif; ?>
<?php else: ?>
<div class="container">
<p>Nothing found... you could try a new search below.</p>
<form class="site-search" action="<?php echo search_url(); ?>" method="post">
<input type="search" class="site-search__search-term" name="term" placeholder="Type your search and hit enter…" value="<?php echo search_term(); ?>">
</form>
</div>
<?php endif; ?>
</div>
<?php theme_include('footer'); ?>