-
Notifications
You must be signed in to change notification settings - Fork 0
/
search.php
144 lines (50 loc) · 2.01 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
<?php
/**
* The template for displaying search results
*/
get_header(); ?>
<?php if ( have_posts() ) : ?>
<div class="page-container">
<div class="page-content">
<?php
// Start the loop.
while ( have_posts() ) : the_post();
?>
<div class="archive-post">
<h1 class="post-title"><a href="<?php echo get_permalink(); ?>"><?php the_title(); ?></a></h1>
<div class="post-meta">
<span class="post-date">Posted on <?php the_date('F d, Y') ?></span> | in <?php echo get_the_category_list(', '); ?> | <a href="<?php echo get_permalink(); ?>#comments"><?php comments_number( '0', '1', '% responses' ); ?> Comments</a>
</div><!-- / post-meta -->
<div class="banner-image"><?php the_post_thumbnail(); ?></div>
<?php the_excerpt(55); ?>
</div><!-- / archive-post-full -->
<?php
// End the loop.
endwhile;
// Previous/next page navigation.
?>
<div class="pagination">
<?php echo paginate_links( array(
'prev_text' => __( '« Previous', 'Burningman2017' ),
'next_text' => __( 'Next »', 'Burningman2017' ),
'before_page_number' => '<span class="meta-nav screen-reader-text">' . __( '', 'Burningman2017' ) . ' </span>',
) ); ?>
</div>
</div><!-- / page-contnt -->
</div><!-- / page-container -->
<?php
// If no content, include the "No posts found" template.
else :
?>
<div class="page-container">
<div class="page-content">
<div class="page-content container-404">
<h1>No Results</h1>
<p>No results were found for the term you entered. Please update your search and try again.</p>
</div><!-- / page-content -->
</div><!-- / page-contnt -->
</div><!-- / page-container -->
<?php
endif;
?>
<?php get_footer(); ?>