-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsearch.php
More file actions
50 lines (38 loc) · 1.9 KB
/
search.php
File metadata and controls
50 lines (38 loc) · 1.9 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
<?php get_header(); ?>
<div class="main-column">
<?php get_template_part( 'promo' ); ?>
<section class="focus search loop">
<header>
<h1 class="section-title">Search results for: <strong><?php echo get_search_query(); ?></strong></h1>
</header>
<?php $blog = new WP_Query( array( 'post_type' => 'post' ) ); if( $blog->have_posts() ) : while( $blog->have_posts() ) : $blog->the_post(); ?>
<article class="post snippet">
<header>
<h1 class="article-title">
<a title="<?php the_title(); ?>" href="<?php the_permalink(); ?>"><?php the_title(); ?></a>
</h1>
<?php get_template_part( 'post', 'meta' ); ?>
</header>
<hr />
<?php the_content() ?>
<span class="full-post">
<a class="btn" title="<?php the_title(); ?>" href="<?php the_permalink();?>">View full post »</a>
</span>
</article><!--/.post.snippet-->
<?php endwhile; else: ?>
<article class="post snippet">
<h2><?php _e('Sorry, there are no posts in this category.'); ?></h2>
</article><!--/.post.snippet-->
<?php endif; ?>
<nav class="back-and-forth">
<ul>
<li><?php next_posts_link('« Previous Posts') ?></li>
<li><?php previous_posts_link('Newer Posts »') ?></li>
</ul>
</nav><!--/.back-and-forth-->
</section><!--/.focus.search.loop-->
</div><!--/.main-column-->
<section class="shoulder">
<?php get_sidebar(); ?>
</section><!--/.shoulder.-->
<?php get_footer(); ?>