forked from zencoder/html5-boilerplate-for-wordpress
-
Notifications
You must be signed in to change notification settings - Fork 1
/
search.php
52 lines (36 loc) · 1.31 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
<?php
/**
* @package WordPress
* @subpackage HTML5_Boilerplate
*/
get_header(); ?>
<div id="main" role="main">
<?php if (have_posts()) : ?>
<h2>Search Results</h2>
<nav>
<div><?php next_posts_link('« Older Entries') ?></div>
<div><?php previous_posts_link('Newer Entries »') ?></div>
</nav>
<?php while (have_posts()) : the_post(); ?>
<article <?php post_class() ?>>
<h3 id="post-<?php the_ID(); ?>"><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h3>
<time><?php the_time('l, F jS, Y') ?></time>
<footer>
<?php the_tags('Tags: ', ', ', '<br />'); ?>
Posted in <?php the_category(', ') ?>
| <?php edit_post_link('Edit', '', ' | '); ?>
<?php comments_popup_link('No Comments »', '1 Comment »', '% Comments »'); ?>
</footer>
</article>
<?php endwhile; ?>
<nav>
<div><?php next_posts_link('« Older Entries') ?></div>
<div><?php previous_posts_link('Newer Entries »') ?></div>
</nav>
<?php else : ?>
<h2>No posts found. Try a different search?</h2>
<?php get_search_form(); ?>
<?php endif; ?>
</div>
<?php get_sidebar(); ?>
<?php get_footer(); ?>