-
Notifications
You must be signed in to change notification settings - Fork 1
/
search.php
46 lines (38 loc) · 1.07 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
<?php get_header(); ?>
<main id="main" class="main" role="main">
<div id="main-content" class="main-content">
<h1 class="archive-title">
<span><?php _e( 'Search Results for:', 'text-domain' ); ?></span>
<?php echo esc_attr( get_search_query() ); ?>
</h1>
<?php
get_search_form();
if ( have_posts() ) :
while ( have_posts() ) :
the_post();
get_template_part( 'content/excerpt' );
endwhile;
?>
<?php temperance_pagination_links(); ?>
<?php else : ?>
<?php
$no_results = __( 'Sorry, No Results.', 'text-domain' );
$try_again = __( 'Try your search again.', 'text-domain' );
$error = __( 'This is the error message in search.php', 'text-domain' );
?>
<article id="post-not-found" class="hentry clearfix">
<header class="article-header">
<h1><?php echo $no_results; ?></h1>
</header>
<section class="entry-content">
<p><?php echo $try_again; ?></p>
</section>
<footer class="article-footer">
<p><?php echo $error; ?></p>
</footer>
</article>
<?php endif; ?>
</div>
</main>
<?php get_sidebar(); ?>
<?php get_footer(); ?>