-
Notifications
You must be signed in to change notification settings - Fork 0
/
search.php
31 lines (26 loc) · 998 Bytes
/
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
<?php theme_include('header'); ?>
<h1 class="wrap">You searched for “<?php echo search_term(); ?>”.</h1>
<?php if(has_search_results()): ?>
<ul class="items searchItems">
<?php $i = 0; while(search_results()): $i++; ?>
<li style="background: hsl(215,28%,<?php echo round((($i / posts_per_page()) * 20) + 20); ?>%)">
<article class="wrap">
<h2>
<a href="<?php echo search_item_url() ?>" title="<?php echo search_item_title() ?>"><?php echo search_item_title() ?></a>
</h2>
</article>
</li>
<?php endwhile ?>
</ul>
<?php if(has_search_pagination()): ?>
<nav class="pagination">
<div class="wrap">
<?php echo search_prev() ?>
<?php echo search_next() ?>
</div>
</nav>
<?php endif ?>
<?php else: ?>
<p class="wrap bottomWrapper">Unfortunately, there's no results for “<?php echo search_term() ?>”. Did you spell everything correctly?</p>
<?php endif ?>
<?php theme_include('footer') ?>