-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsearch.php
executable file
·50 lines (50 loc) · 1.51 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
<?php get_header(); ?>
<div class="content thin">
<?php if (have_posts()) : ?>
<div class="page-title">
<h4>
<?php _e('Results for', 'masonry'); echo " '" . get_search_query() . "'"; ?>
</h4>
</div>
<!-- /page-title -->
<div class="posts" id="posts">
<?php while (have_posts()) : the_post(); ?>
<?php get_template_part('content', get_post_format()); ?>
<?php endwhile; ?>
</div>
<!-- /posts -->
<?php if ($wp_query->max_num_pages > 1) : ?>
<div class="archive-nav">
<?php echo get_next_posts_link('« ' . __('Previous', 'masonry')); ?>
<?php echo get_previous_posts_link(__('Next', 'masonry') . ' »'); ?>
<div class="clear"></div>
</div>
<!-- /post-nav archive-nav -->
<?php endif; ?>
<?php else : ?>
<div class="post single">
<div class="post-subject">
<div class="post-header">
<h2 class="post-title">
<?php _e('No result. Try a search?', 'masonry'); ?>
</h2>
</div>
<!-- /post-header section -->
</div>
<!-- /post-subject -->
<div class="post-body">
<div class="post-content">
<?php get_search_form(); ?>
</div>
<!-- /post-content -->
</div>
<div class="post-footer">
</div>
<!-- /post-footer -->
</div>
<!-- /post -->
<?php endif; ?>
<div class="clear"></div>
</div>
<!-- /content -->
<?php get_footer(); ?>