-
Notifications
You must be signed in to change notification settings - Fork 0
/
search.php
37 lines (25 loc) · 1.04 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
<?php get_header(); ?>
<div class="main">
<header class="nl-main-title">
<?php if ( have_posts() ) : ?>
<h1 class="page-title"><?php printf( __( 'Search Results for: <b>%s</b>', 'shiny-blog' ), '<span>' . get_search_query() . '</span>' ); ?></h1>
<?php else : ?>
<h1 class="page-title"><?php _e( 'Nothing Found', 'shiny-blog' ); ?></h1>
<?php endif; ?>
</header><!-- .nl-main-title -->
<?php if ( have_posts() ) :
while ( have_posts() ) : the_post();
get_template_part( 'template-parts/content', get_post_format() );
endwhile;
get_template_part( 'template-parts/pagination' );
else : ?>
<div class="searchresult">
<p><?php _e( 'Sorry, but nothing matched your search terms. Please try again with some different keywords.', 'shiny-blog' ); ?></p>
</div><!-- .searchresult -->
<div class="notfound-search">
<?php get_search_form(); ?>
</div><!-- .notfound-search -->
<?php endif; ?>
</div><!-- .main -->
<?php get_sidebar(); ?>
<?php get_footer();