forked from gramophone-wp/Gramophone
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsearch.php
79 lines (61 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
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
<?php
/**
*******************************************************************************
* //search.php
*******************************************************************************
*
* The search results.
*
* CODEX REF
* https://codex.wordpress.org/Creating_a_Search_Page
*
* @author
* @copyright
* @link
* @todo
* @license
* @since
* @version
**/
?>
<?php get_header(); ?>
<div class="jumbotron jumbotron-fluid">
<div class="container">
<h3>Results for: <?php echo esc_attr(get_search_query()); ?></h1>
</div>
</div>
<div class="container">
<div class="row">
<div id="main" class="col col-lg-12" role="main">
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<article id="post-<?php the_ID(); ?>" <?php post_class('clearfix'); ?> role="article">
<h3>
<a href="<?php the_permalink() ?>" rel="bookmark" title="<?php the_title_attribute(); ?>">
<?php the_title(); ?>
</a>
</h3>
<p class="meta">Posted: <time datetime="<?php echo the_time('Y-m-j'); ?>" pubdate><?php the_time(); ?></time> by <?php the_author_posts_link(); ?> <span class="amp">&</span> in <?php the_category(', '); ?>.</p>
<?php the_excerpt(); ?>
</article>
<?php endwhile; ?>
<?php if (function_exists('wp_bootstrap_page_navi')): ?>
<?php wp_bootstrap_page_navi(); ?>
<?php else: ?>
<nav class="wp-prev-next">
<ul class="clearfix">
<li class="prev-link">Older Entries</li>
<li class="next-link">Newer Entries</li>
</ul>
</nav>
<?php endif; ?>
<?php else: ?>
<article id="post-not-found">
<h1>Not Found</h1>
<p>Sorry, but your search returned no results.</p>
</article>
<?php endif; ?>
</div>
<?php get_sidebar(); ?>
</div>
</div>
<?php get_footer(); ?>