-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsearch.php
50 lines (45 loc) · 1.33 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
<!DOCTYPE html>
<head>
<title>Crayons & Cairns | Search Results</title>
<?php get_header(); ?>
<main>
<div class="main-content">
<div class="container">
<div class="row">
<div class="col s12 m12 l9" id="search-results">
<h3>
<?php printf( __( 'Search Results for: %s' ), '<span>"' . get_search_query() . '"</span>'); ?>
</h3>
<?php if ( have_posts() ) : ?>
<?php
// Start the loop.
while ( have_posts() ) : the_post(); ?>
<a href="<?php the_permalink(); ?>">
<div class="row">
<div class="col s3 m2">
<?php the_post_thumbnail(); ?>
</div>
<div class="col s9 m10 search-result-excerpt">
<strong><?php the_title(); ?></strong><br>
<?php the_excerpt(); ?>
<div class="search-result-meta">
Posted on <?php the_time('F jS, Y') ?> by <?php the_author() ?>
</div>
</div>
</div>
</a>
<hr>
<?php endwhile; // End the loop.
// If no content, include the "No posts found" template.
else : ?>
No matches found.
<?php endif; ?>
</div>
<div class="col s12 m12 l3">
<?php get_sidebar(); ?>
</div>
</div>
</div>
</div>
</main>
<?php get_footer(); ?>