-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsearch.php
More file actions
115 lines (58 loc) · 2.55 KB
/
search.php
File metadata and controls
115 lines (58 loc) · 2.55 KB
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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
<?php get_header(); ?>
<div class="content section-inner">
<?php if ( have_posts() ) : ?>
<div class="posts">
<div class="page-title">
<h4>
<?php
printf( __( 'Search results: "%s"', 'nayncuration' ), get_search_query() );
$paged = get_query_var( 'paged' ) ? get_query_var( 'paged' ) : 1;
if ( 1 < $wp_query->max_num_pages ) : ?>
<span><?php printf( __( '(page %1$s of %2$s)', 'nayncuration' ), $paged, $wp_query->max_num_pages ); ?></span>
<?php endif; ?>
</h4>
</div>
<div class="clear"></div>
<?php while ( have_posts() ) : the_post(); ?>
<div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<?php get_template_part( 'content', get_post_format() ); ?>
<div class="clear"></div>
</div>
<?php endwhile; ?>
</div><!-- .posts -->
<?php if ( $wp_query->max_num_pages > 1 ) : ?>
<div class="post-nav archive-nav">
<?php echo get_next_posts_link( __( 'Older', 'nayncuration' ) . '<span>' . __( 'posts', 'nayncuration' ) . '</span>' ); ?>
<?php echo get_previous_posts_link( __( 'Newer', 'nayncuration' ) . '<span>' . __( 'posts', 'nayncuration' ) . '</span>' ); ?>
<div class="clear"></div>
</div><!-- .post-nav archive-nav -->
<?php endif; ?>
<?php else : ?>
<div class="posts">
<div class="page-title">
<h4>
<?php
printf( __( 'Search results: "%s"', 'nayncuration' ), get_search_query() );
$paged = get_query_var( 'paged' ) ? get_query_var( 'paged' ) : 1;
if ( 1 < $wp_query->max_num_pages ) : ?>
<span><?php printf( __( '(page %1$s of %2$s)', 'nayncuration' ), $paged, $wp_query->max_num_pages ); ?></span>
<?php endif; ?>
</h4>
</div>
<div class="clear"></div>
<div class="post">
<div class="post-bubbles">
<a href="<?php the_permalink(); ?>" class="format-bubble"></a>
</div>
<div class="content-inner">
<div class="post-content">
<p><?php _e( 'No results. Try again, would you kindly?', 'nayncuration' ); ?></p>
<?php get_search_form(); ?>
</div><!-- .post-content -->
</div><!-- .content-inner -->
<div class="clear"></div>
</div><!-- .post -->
</div><!-- .posts -->
<?php endif; ?>
</div><!-- .content section-inner -->
<?php get_footer(); ?>