-
Notifications
You must be signed in to change notification settings - Fork 0
/
search.php
56 lines (50 loc) · 1.29 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
<?php
/**
* Search Page template
*
* Template to display search results.
*
* @package Minilog
*/
get_header();
?>
<div class="mini-archive">
<?php
if ( have_posts() ) :
while ( have_posts() ) :
the_post();
?>
<div class="mini-excerpt">
<div class="entry-header"><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></div>
<div class="entry-meta">
<?php the_time( get_option( 'date_format' ) ); ?>
<?php esc_html_e( ' by ', 'minilog' ); ?>
<?php the_author(); ?>
</div>
<?php the_excerpt(); ?>
</div> <!-- excerpt -->
<?php endwhile; ?>
<div class="pagination">
<?php
the_posts_pagination(
array(
'mid_size' => 10,
'prev_text' => __( '« Previous', 'minilog' ),
'next_text' => __( 'Next »', 'minilog' ),
)
);
?>
</div> <!-- /pagination -->
<?php else : ?>
<div class="mini-excerpt">
<div class="entry-header"><?php esc_html_e( 'Nothing found', 'minilog' ); ?></div>
<p><?php esc_html_e( 'Apologies, but no entries were found. Please try searching again.', 'minilog' ); // If there are no results, display the search bar again. ?></p>
<center>
<?php get_search_form(); ?>
</center>
</div> <!-- /excerpt -->
<?php endif; ?>
</div> <!-- /archive -->
<?php get_sidebar(); ?>
</div> <!-- /container -->
<?php get_footer(); ?>