-
Notifications
You must be signed in to change notification settings - Fork 3
/
search.php
23 lines (21 loc) · 1.02 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
<?php get_header(); ?>
<?php if (have_posts()) : ?>
<h1>Search Results for ‘<?php echo get_search_query(); ?>’</h1>
<?php while (have_posts()) : the_post(); ?>
<article <?php post_class() ?>>
<h1 id="post-<?php the_ID(); ?>"><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h1>
<time datetime="<?php the_time('Y-m-d') ?>" pubdate><?php the_time('l, F jS, Y') ?></time>
<?php comments_popup_link('No Comments »', '1 Comment »', '% Comments »'); ?>
</article>
<?php endwhile; ?>
<?php if (show_posts_nav()) : ?>
<nav class="nextPrevLinks">
<?php my_paginate_links(); ?>
</nav>
<?php endif; ?>
<?php else : ?>
<h2>No posts found. Try a different search?</h2>
<?php get_search_form(); ?>
<?php endif; ?>
<?php get_sidebar(); ?>
<?php get_footer(); ?>