-
Notifications
You must be signed in to change notification settings - Fork 0
/
search.php
45 lines (39 loc) · 2.12 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
<?php theme_include('header'); ?>
<div class="page_wrap">
<section class="content">
<h1>You searched for “<?php echo search_term(); ?>”.</h1>
<?php if(has_search_results()): ?>
<p>We found <?php echo total_search_results(); ?> <?php echo pluralise(total_search_results(), 'result'); ?> for “<?php echo search_term(); ?>”</p>
<ul class="posts_wrap">
<?php while(search_results()): ?>
<li>
<a href="<?php echo article_url(); ?>" title="<?php echo article_title(); ?>">
<time datetime="<?php echo date(DATE_W3C, article_time()); ?>"><?php echo relative_time(article_time()); ?></time>
<h2><?php echo article_title(); ?></h2>
<p id="desc"><?php echo article_description(); ?></p>
</a>
</li>
<?php endwhile; ?>
</ul>
<div class="search_wrap">
<form id="search" action="<?php echo search_url(); ?>" method="post">
<input type="search" name="term" placeholder="To search, type and hit enter…" value="<?php echo search_term(); ?>">
</form>
</div>
<div class="feed_wrap">
<h3>Topics:</h3>
<p class="topic"><a href="../search/programming">Programming</a> - Posts teaching and advising programming techniques, bringing you the latest information and news to keep you up to date with your favourite languages.</p>
<p class="topic"><a href="../search/internet">The Internet</a> - Primarily random posts with no category, else they involve a specific feature of the internet, possibly something I have found.</p>
<p class="topic"><a href="../search/anchor">Anchor</a> - Posts in this topic are about Anchor, the free; open-source blogging CMS developed by an ever growing community.</p>
</div>
<?php else: ?>
<p>Unfortunately, there's no results for “<?php echo search_term(); ?>”. Did you spell everything correctly?</p>
<div class="search_wrap_large">
<form id="search" action="<?php echo search_url(); ?>" method="post">
<input type="search" name="term" placeholder="To search, type and hit enter…" value="<?php echo search_term(); ?>">
</form>
</div>
<?php endif; ?>
</section>
</div>
<?php theme_include('footer'); ?>