-
-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathsearch.php
55 lines (49 loc) · 2.2 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
<?php
/**
* The template for displaying search results pages
*
*/
get_header(); ?>
<div class="inner-section-title">
<div class="grid-content">
<div class="grid-x align-center">
<header class="post-header">
<?php if (have_posts()) : ?>
<h1 class="entry-title big"><?php printf(__('Search Results for: %s', 'twentyseventeen'), '<span>' . get_search_query() . '</span>'); ?></h1>
<?php else : ?>
<h1 class="entry-title big"><?php _e('Nothing Found', 'twentyseventeen'); ?></h1>
<?php endif; ?>
</header>
</div>
</div>
</div>
<div class="page-body">
<div class="grid-container main-content">
<div class="grid-x grid-padding-x align-center">
<div class="large-10 cell">
<div class="inner-section-list">
<section class="item-acordion entry-content">
<div id="primary" class="content-area post-content">
<?php
if ( have_posts() ) :
while (have_posts()): the_post(); ?>
<article class="hentry search-result">
<a href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>" class="entry-title"><?php the_title(); ?></a>
<?php the_excerpt(); ?>
</article>
<?php
endwhile;
else : ?>
<p class="text-center"><?php _e( 'Sorry, but nothing matched your search terms. Please try again with some different keywords.', 'twentyseventeen' ); ?></p>
<?php
get_search_form();
endif;
?>
</div><!-- #primary -->
</section><!-- .item-accordion -->
</div><!-- .inner-selection-list -->
</div>
</div>
</div><!-- .block-area -->
</div>
<?php get_footer();