forked from rotarytheme/rotary
-
Notifications
You must be signed in to change notification settings - Fork 0
/
loop-search.php
61 lines (46 loc) · 2.35 KB
/
loop-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
53
54
55
56
57
58
59
60
61
<?php
/**
* The loop that displays posts.
*
* @package WordPress
* @subpackage Rotary
* @since Rotary 1.0
*/
?>
<?php /* If there are no posts to display, such as an empty archive page */ ?>
<?php if ( ! have_posts() ) : ?>
<h2><?php _e( 'Not Found', 'Rotary' ); ?></h2>
<p><?php _e( 'Apologies, but no results were found for the requested archive. Perhaps searching will help find a related post.', 'Rotary' ); ?></p>
<?php get_search_form(); ?>
<?php endif; ?>
<?php while ( have_posts() ) : the_post(); ?>
<?php /* Display navigation to next/previous pages when applicable */ ?>
<?php if ( $wp_query->max_num_pages > 1 ) : ?>
<nav class="prevnext">
<div class="nav-previous"><?php next_posts_link( __( '< Older posts', 'Rotary' ) ); ?></div>
<div class="nav-next"><?php previous_posts_link( __( 'Newer posts >', 'Rotary' ) ); ?></div>
</nav>
<?php endif; ?>
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<div class="inner">
<header>
<h2><a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( 'Permalink to %s', 'Rotary' ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark"><?php the_title(); ?></a></h2>
</header>
<?php the_excerpt(); ?>
<footer class="meta">
<?php if ( count( get_the_category() ) ) : ?>
<?php printf( __( 'Posted in %2$s', 'Rotary' ), 'entry-utility-prep entry-utility-prep-cat-links', get_the_category_list( ', ' ) ); ?> ·
<?php endif; ?>
<?php
$tags_list = get_the_tag_list( '', ', ' );
if ( $tags_list ):
?>
<?php printf( __( 'Tagged %2$s', 'Rotary' ), 'entry-utility-prep entry-utility-prep-tag-links', $tags_list ); ?> |
<?php endif; ?>
<?php comments_popup_link( __( 'Leave a comment', 'Rotary' ), __( '1 Comment', 'Rotary' ), __( '% Comments', 'Rotary' ), 'commentspopup' ); ?>
<?php edit_post_link( __( 'Edit', 'Rotary' ), ' · ', '' ); ?>
</footer>
</div><!--.inner-->
</article>
<?php comments_template( '', true ); ?>
<?php endwhile; // End the loop. Whew. ?>