forked from ozh/ozh-tweet-archive-theme
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsearch.php
33 lines (23 loc) · 812 Bytes
/
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
<?php get_header(); ?>
<?php if (have_posts()) : ?>
<!-- !BEGIN #tweets -->
<div id="tweets">
<h2>Search results for «<?php the_search_query(); ?>» <?php if( $paged > 1 ) echo "« page $paged"; ?></h2>
<?php while (have_posts()) : the_post(); ?>
<div <?php post_class() ?> id="post-<?php the_ID(); ?>">
<div class="tweet">
<?php the_content(); ?>
</div>
<?php get_template_part( 'post_meta' ); ?>
</div>
<?php endwhile; ?>
<div class="pagination">
<div class="older"><?php next_posts_link('« Older tweets') ?></div>
<div class="newer"><?php previous_posts_link('Newer tweets »') ?></div>
</div>
</div>
<!-- END #tweets -->
<?php else : ?>
<h2>No posts found. Try a different search.</h2>
<?php endif; ?>
<?php get_footer(); ?>